Loading core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php +2 −2 Changes for core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ use Drupal\layout_builder\SectionComponent; use Drupal\Tests\UnitTestCase; use Prophecy\Argument; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @coversDefaultClass \Drupal\layout_builder\SectionComponent Loading @@ -39,7 +39,7 @@ public function testToRenderArray() { /** @var \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent $event */ $event = $args[0]; $event->setBuild(['#markup' => $event->getPlugin()->getPluginId()]); return; return $event; }); $layout_plugin = $this->prophesize(LayoutInterface::class); Loading core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php +4 −0 Changes for core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountProxy; use Drupal\Tests\UnitTestCase; use Prophecy\Argument; use Symfony\Contracts\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** Loading @@ -19,6 +21,7 @@ class AccountProxyTest extends UnitTestCase { */ public function testId() { $dispatcher = $this->prophesize(EventDispatcherInterface::class); $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event()); $account_proxy = new AccountProxy($dispatcher->reveal()); $this->assertSame(0, $account_proxy->id()); $account_proxy->setInitialAccountId(1); Loading @@ -39,6 +42,7 @@ public function testId() { public function testSetInitialAccountIdException() { $this->expectException(\LogicException::class); $dispatcher = $this->prophesize(EventDispatcherInterface::class); $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event()); $account_proxy = new AccountProxy($dispatcher->reveal()); $current_user = $this->prophesize(AccountInterface::class); $account_proxy->setAccount($current_user->reveal()); Loading Loading
core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php +2 −2 Changes for core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ use Drupal\layout_builder\SectionComponent; use Drupal\Tests\UnitTestCase; use Prophecy\Argument; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @coversDefaultClass \Drupal\layout_builder\SectionComponent Loading @@ -39,7 +39,7 @@ public function testToRenderArray() { /** @var \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent $event */ $event = $args[0]; $event->setBuild(['#markup' => $event->getPlugin()->getPluginId()]); return; return $event; }); $layout_plugin = $this->prophesize(LayoutInterface::class); Loading
core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php +4 −0 Changes for core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountProxy; use Drupal\Tests\UnitTestCase; use Prophecy\Argument; use Symfony\Contracts\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** Loading @@ -19,6 +21,7 @@ class AccountProxyTest extends UnitTestCase { */ public function testId() { $dispatcher = $this->prophesize(EventDispatcherInterface::class); $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event()); $account_proxy = new AccountProxy($dispatcher->reveal()); $this->assertSame(0, $account_proxy->id()); $account_proxy->setInitialAccountId(1); Loading @@ -39,6 +42,7 @@ public function testId() { public function testSetInitialAccountIdException() { $this->expectException(\LogicException::class); $dispatcher = $this->prophesize(EventDispatcherInterface::class); $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event()); $account_proxy = new AccountProxy($dispatcher->reveal()); $current_user = $this->prophesize(AccountInterface::class); $account_proxy->setAccount($current_user->reveal()); Loading