protected function EntityViewControllerTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php \Drupal\Tests\system\Functional\Entity\EntityViewControllerTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityViewControllerTest.php, line 34
Class
- EntityViewControllerTest
- Tests EntityViewController functionality.
Namespace
Drupal\Tests\system\Functional\EntityCode
protected function setUp() : void {
parent::setUp();
// Create some dummy entity_test entities.
for ($i = 0; $i < 2; $i++) {
$entity_test = $this
->createTestEntity('entity_test');
$entity_test
->save();
$this->entities[] = $entity_test;
}
$this
->drupalLogin($this
->drupalCreateUser([
'view test entity',
]));
}