3 namespace Drupal\Tests\entity\Functional\Menu;
5 use Drupal\Tests\BrowserTestBase;
8 * Tests that entity local actions are generated correctly.
12 * @runTestsInSeparateProcesses
14 * @preserveGlobalState disabled
16 class EntityLocalActionTest extends BrowserTestBase {
21 protected static $modules = ['block', 'entity', 'entity_module_test'];
26 protected function setUp() {
29 $this->drupalPlaceBlock('local_actions_block');
31 $account = $this->drupalCreateUser(['administer entity_test_enhanced']);
32 $this->drupalLogin($account);
36 * Tests the local action on the collection is provided correctly.
38 public function testCollectionLocalAction() {
39 $this->drupalGet('/entity_test_enhanced');
40 $this->assertSession()->linkByHrefExists('/entity_test_enhanced/add?destination=/entity_test_enhanced');
41 $this->assertSession()->linkExists('Add enhanced entity');