X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FFunctional%2FMenu%2FBreadcrumbTest.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FTests%2FMenu%2FBreadcrumbTest.php;h=5a17d47419f4f3bb92b881c27d6c2039ca19a97b;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=64c8c159774a1a3b969ad23938943c67e3ab3282;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/system/src/Tests/Menu/BreadcrumbTest.php b/web/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php similarity index 97% rename from web/core/modules/system/src/Tests/Menu/BreadcrumbTest.php rename to web/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php index 64c8c1597..5a17d4741 100644 --- a/web/core/modules/system/src/Tests/Menu/BreadcrumbTest.php +++ b/web/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php @@ -1,9 +1,10 @@ $link->getMenuName() . ':' . $link->getPluginId(), ]; - $this->drupalPostForm('node/' . $parent->id() . '/edit', $edit, t('Save and keep published')); + $this->drupalPostForm('node/' . $parent->id() . '/edit', $edit, t('Save')); $expected = [ "node" => $link->getTitle(), ]; @@ -227,7 +232,7 @@ class BreadcrumbTest extends MenuTestBase { $edit = [ 'field_tags[target_id]' => implode(',', array_keys($tags)), ]; - $this->drupalPostForm('node/' . $parent->id() . '/edit', $edit, t('Save and keep published')); + $this->drupalPostForm('node/' . $parent->id() . '/edit', $edit, t('Save')); // Put both terms into a hierarchy Drupal » Breadcrumbs. Required for both // the menu links and the terms itself, since taxonomy_term_page() resets @@ -358,17 +363,17 @@ class BreadcrumbTest extends MenuTestBase { // user is not able to access "Administer". $trail = $home; $this->assertBreadcrumb('admin', $trail, t('Access denied')); - $this->assertResponse(403); + $this->assertSession()->statusCodeEquals(403); // Since the 'admin' path is not accessible, we still expect only the Home // link. $this->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');