function PermissionsTest::setUp
Same name in other branches
- 10 core/modules/user/tests/src/Unit/Plugin/views/field/PermissionsTest.php \Drupal\Tests\user\Unit\Plugin\views\field\PermissionsTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ user/ tests/ src/ Unit/ Plugin/ views/ field/ PermissionsTest.php, line 29
Class
- PermissionsTest
- @coversDefaultClass \Drupal\user\Plugin\views\field\Permissions @group user
Namespace
Drupal\Tests\user\Unit\Plugin\views\fieldCode
protected function setUp() : void {
parent::setUp();
$this->setUpMockLoggerWithMissingEntity();
$container = \Drupal::getContainer();
$container->set('string_translation', $this->createMock(TranslationInterface::class));
$container->set('user.permissions', $this->createMock(PermissionHandlerInterface::class));
\Drupal::setContainer($container);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.