You are here

protected function EntityLocalTaskTest::setUp in Entity API 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/Menu/EntityLocalTaskTest.php, line 39

Class

EntityLocalTaskTest
Tests that entity local tasks are generated correctly.

Namespace

Drupal\Tests\entity\Functional\Menu

Code

protected function setUp() {
  parent::setUp();
  $entity = EnhancedEntity::create([
    'type' => 'default',
  ]);
  $entity
    ->save();
  $this->viewPath = $entity
    ->toUrl()
    ->toString();
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $account = $this
    ->drupalCreateUser([
    'administer entity_test_enhanced',
  ]);
  $this
    ->drupalLogin($account);
}