diff -u b/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php b/core/modules/system/src/Tests/Menu/AssertBreadcrumbTrait.php --- b/core/modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php +++ b/core/modules/system/src/Tests/Menu/AssertBreadcrumbTrait.php @@ -1,12 +1,17 @@ assertBreadcrumb('admin/reports', $trail, t('Reports')); - $this->assertNoResponse(403); + $this->assertSession()->statusCodeNotEquals(403); // Since the Reports page is accessible, that will show. $trail += ['admin/reports' => t('Reports')]; $this->assertBreadcrumb('admin/reports/dblog', $trail, t('Recent log messages')); - $this->assertNoResponse(403); + $this->assertSession()->statusCodeNotEquals(403); // Ensure that the breadcrumb is safe against XSS. $this->drupalGet('menu-test/breadcrumb1/breadcrumb2/breadcrumb3'); diff -u b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php --- b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php +++ b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php @@ -129,7 +129,7 @@ // Ensure the view tab is active. $result = $this->xpath('//ul[contains(@class, "tabs")]//li[contains(@class, "active")]/a'); $this->assertEqual(1, count($result), 'There is just a single active tab.'); - $this->assertEqual('View', $result[0]->getText(), 'The view tab is active.'); + $this->assertEqual('View(active tab)', $result[0]->getText(), 'The view tab is active.'); // Verify that local tasks in the second level appear. $sub_tasks = [ @@ -144,15 +144,15 @@ $result = $this->xpath('//ul[contains(@class, "tabs")]//li[contains(@class, "active")]/a'); $this->assertEqual(1, count($result), 'There is just a single active tab.'); - $this->assertEqual('Settings', $result[0]->getText(), 'The settings tab is active.'); + $this->assertEqual('Settings(active tab)', $result[0]->getText(), 'The settings tab is active.'); $this->drupalGet(Url::fromRoute('menu_test.local_task_test_tasks_settings_sub1')); $this->assertLocalTasks($sub_tasks, 1); $result = $this->xpath('//ul[contains(@class, "tabs")]//a[contains(@class, "active")]'); $this->assertEqual(2, count($result), 'There are tabs active on both levels.'); - $this->assertEqual('Settings', $result[0]->getText(), 'The settings tab is active.'); - $this->assertEqual('Dynamic title for TestTasksSettingsSub1', $result[1]->getText(), 'The sub1 tab is active.'); + $this->assertEqual('Settings(active tab)', $result[0]->getText(), 'The settings tab is active.'); + $this->assertEqual('Dynamic title for TestTasksSettingsSub1(active tab)', $result[1]->getText(), 'The sub1 tab is active.'); $this->assertCacheTag('kittens:ragdoll'); $this->assertCacheTag('kittens:dwarf-cat'); @@ -162,8 +162,8 @@ $result = $this->xpath('//ul[contains(@class, "tabs")]//li[contains(@class, "active")]'); $this->assertEqual(2, count($result), 'There are tabs active on both levels.'); - $this->assertEqual('Settings', $result[0]->find('a')->getText(), 'The settings tab is active.'); - $this->assertEqual('Derive 1', (string) $result[1]->find('a')->getText(), 'The derive1 tab is active.'); + $this->assertEqual('Settings(active tab)', $result[0]->getText(), 'The settings tab is active.'); + $this->assertEqual('Derive 1(active tab)', $result[1]->getText(), 'The derive1 tab is active.'); // Ensures that the local tasks contains the proper 'provider key' $definitions = $this->container->get('plugin.manager.menu.local_task')->getDefinitions(); @@ -190,7 +190,7 @@ $result = $this->xpath('//ul[contains(@class, "tabs")]//li[contains(@class, "active")]'); $this->assertEqual(1, count($result), 'There is one active tab.'); - $this->assertEqual('upcasting sub1', (string) $result[0]->find('a')->getText(), 'The "upcasting sub1" tab is active.'); + $this->assertEqual('upcasting sub1(active tab)', $result[0]->getText(), 'The "upcasting sub1" tab is active.'); $this->drupalGet(Url::fromRoute('menu_test.local_task_test_upcasting_sub2', ['entity_test' => '1'])); @@ -202,7 +202,7 @@ $result = $this->xpath('//ul[contains(@class, "tabs")]//li[contains(@class, "active")]'); $this->assertEqual(1, count($result), 'There is one active tab.'); - $this->assertEqual('upcasting sub2', (string) $result[0]->find('a')->getText(), 'The "upcasting sub2" tab is active.'); + $this->assertEqual('upcasting sub2(active tab)', $result[0]->getText(), 'The "upcasting sub2" tab is active.'); } /**