This commit is contained in:
2020-07-13 17:09:59 +02:00
parent 03559a7b76
commit 3a082e23cc
492 changed files with 4129 additions and 982 deletions
@@ -46,8 +46,14 @@ class TourHelpPageTest extends BrowserTestBase {
// Create users. For the Tour user, include permissions for the language
// tours' parent pages, but not the translation tour's parent page. See
// self:getTourList().
$this->tourUser = $this->drupalCreateUser(['access administration pages', 'access tour', 'administer languages']);
$this->noTourUser = $this->drupalCreateUser(['access administration pages']);
$this->tourUser = $this->drupalCreateUser([
'access administration pages',
'access tour',
'administer languages',
]);
$this->noTourUser = $this->drupalCreateUser([
'access administration pages',
]);
}
/**
@@ -73,7 +79,7 @@ class TourHelpPageTest extends BrowserTestBase {
// All users should be able to see the module section.
$this->assertText('Module overviews are provided by modules');
foreach ($this->getModuleList() as $name) {
$this->assertLink($name);
$this->assertSession()->linkExists($name);
}
// Some users should be able to see the tour section.
@@ -89,10 +95,10 @@ class TourHelpPageTest extends BrowserTestBase {
// Test the titles that should be links.
foreach ($titles[0] as $title) {
if ($tours_ok) {
$this->assertLink($title);
$this->assertSession()->linkExists($title);
}
else {
$this->assertNoLink($title);
$this->assertSession()->linkNotExists($title);
// Just test the first item in the list of links that should not
// be there, because the second matches the name of a module that is
// in the Module overviews section, so the link will be there and