diff --git a/core/modules/tour/src/Tests/TourTestBase.php b/core/modules/tour/src/Tests/TourTestBase.php
deleted file mode 100644
index 8383c99..0000000
--- a/core/modules/tour/src/Tests/TourTestBase.php
+++ /dev/null
@@ -1,70 +0,0 @@
-assertTourTips();
- *
- * // Advanced example. The following would be used for multipage or
- * // targeting a specific subset of tips.
- * $tips = array();
- * $tips[] = array('data-id' => 'foo');
- * $tips[] = array('data-id' => 'bar');
- * $tips[] = array('data-class' => 'baz');
- * $this->assertTourTips($tips);
- * @endcode
- */
- public function assertTourTips($tips = array()) {
- // Get the rendered tips and their data-id and data-class attributes.
- if (empty($tips)) {
- // Tips are rendered as
elements inside .
- $rendered_tips = $this->xpath('//ol[@id = "tour"]//li[starts-with(@class, "tip")]');
- foreach ($rendered_tips as $rendered_tip) {
- $attributes = (array) $rendered_tip->attributes();
- $tips[] = $attributes['@attributes'];
- }
- }
-
- // If the tips are still empty we need to fail.
- if (empty($tips)) {
- $this->fail('Could not find tour tips on the current page.');
- }
- else {
- // Check for corresponding page elements.
- $total = 0;
- $modals = 0;
- foreach ($tips as $tip) {
- if (!empty($tip['data-id'])) {
- $elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $this->content, TRUE);
- $this->assertTrue(!empty($elements) && count($elements) === 1, format_string('Found corresponding page element for tour tip with id #%data-id', array('%data-id' => $tip['data-id'])));
- }
- elseif (!empty($tip['data-class'])) {
- $elements = \PHPUnit_Util_XML::cssSelect('.' . $tip['data-class'], TRUE, $this->content, TRUE);
- $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', array('%data-class' => $tip['data-class'])));
- }
- else {
- // It's a modal.
- $modals++;
- }
- $total++;
- }
- $this->pass(format_string('Total %total Tips tested of which %modals modal(s).', array('%total' => $total, '%modals' => $modals)));
- }
- }
-
-}
diff --git a/core/modules/tour/src/Tests/TourTestBasic.php b/core/modules/tour/src/Tests/TourTestBasic.php
deleted file mode 100644
index e79eb2b..0000000
--- a/core/modules/tour/src/Tests/TourTestBasic.php
+++ /dev/null
@@ -1,70 +0,0 @@
- array(
- * array('data-id' => 'foo'),
- * array('data-class' => 'bar'),
- * ),
- * );
- * @endcode
- */
- protected $tips = array();
-
- /**
- * An admin user with administrative permissions for tour.
- *
- * @var \Drupal\user\UserInterface
- */
- protected $adminUser;
-
- /**
- * The permissions required for a logged in user to test tour tips.
- *
- * @var array
- * A list of permissions.
- */
- protected $permissions = array('access tour');
-
- protected function setUp() {
- parent::setUp();
-
- // Make sure we are using distinct default and administrative themes for
- // the duration of these tests.
- $this->container->get('theme_handler')->install(array('bartik', 'seven'));
- $this->config('system.theme')
- ->set('default', 'bartik')
- ->set('admin', 'seven')
- ->save();
-
- $this->permissions[] = 'view the administration theme';
-
- // Create an admin user to view tour tips.
- $this->adminUser = $this->drupalCreateUser($this->permissions);
- $this->drupalLogin($this->adminUser);
- }
-
- /**
- * A simple tip test.
- */
- public function testTips() {
- foreach ($this->tips as $path => $attributes) {
- $this->drupalGet($path);
- $this->assertTourTips($attributes);
- }
- }
-
-}
diff --git a/core/modules/tour/src/Tests/TourCacheTagsTest.php b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
similarity index 91%
rename from core/modules/tour/src/Tests/TourCacheTagsTest.php
rename to core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
index d175d83..c5aa1f9 100644
--- a/core/modules/tour/src/Tests/TourCacheTagsTest.php
+++ b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
@@ -18,7 +18,7 @@ class TourCacheTagsTest extends PageCacheTagsTestBase {
/**
* {@inheritdoc}
*/
- public static $modules = array('tour', 'tour_test');
+ public static $modules = ['tour', 'tour_test'];
/**
* {@inheritdoc}
@@ -54,7 +54,7 @@ public function testRenderedTour() {
$this->verifyPageCache($url, 'HIT', $expected_tags);
// Verify that after modifying the tour, there is a cache miss.
- $this->pass('Test modification of tour.', 'Debug');
+ $this->assertTrue('Test modification of tour.', 'Debug');
Tour::load('tour-test')->save();
$this->verifyPageCache($url, 'MISS');
@@ -62,7 +62,7 @@ public function testRenderedTour() {
$this->verifyPageCache($url, 'HIT', $expected_tags);
// Verify that after deleting the tour, there is a cache miss.
- $this->pass('Test deletion of tour.', 'Debug');
+ $this->assertTrue('Test deletion of tour.', 'Debug');
Tour::load('tour-test')->delete();
$this->verifyPageCache($url, 'MISS');
diff --git a/core/modules/tour/src/Tests/TourHelpPageTest.php b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php
similarity index 85%
rename from core/modules/tour/src/Tests/TourHelpPageTest.php
rename to core/modules/tour/tests/src/Functional/TourHelpPageTest.php
index c6ab670..cfbb4f7 100644
--- a/core/modules/tour/src/Tests/TourHelpPageTest.php
+++ b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php
@@ -66,17 +66,17 @@ protected function verifyHelp($tours_ok = TRUE) {
$this->drupalGet('admin/help');
// All users should be able to see the module section.
- $this->assertText('Module overviews are provided by modules');
+ $this->assertSession()->pageTextContains('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.
if ($tours_ok) {
- $this->assertText('Tours guide you through workflows');
+ $this->assertSession()->pageTextContains('Tours guide you through workflows');
}
else {
- $this->assertNoText('Tours guide you through workflows');
+ $this->assertSession()->pageTextNotContains('Tours guide you through workflows');
}
$titles = $this->getTourList();
@@ -84,10 +84,10 @@ protected function verifyHelp($tours_ok = TRUE) {
// 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
@@ -100,11 +100,11 @@ protected function verifyHelp($tours_ok = TRUE) {
// Test the titles that should not be links.
foreach ($titles[1] as $title) {
if ($tours_ok) {
- $this->assertText($title);
- $this->assertNoLink($title);
+ $this->assertSession()->pageTextContains($title);
+ $this->assertSession()->linkNotExists($title);
}
else {
- $this->assertNoText($title);
+ $this->assertSession()->pageTextNotContains($title);
// Just test the first item in the list of text that should not
// be there, because the second matches part of the name of a module
// that is in the Module overviews section, so the text will be there
diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php
similarity index 68%
rename from core/modules/tour/src/Tests/TourTest.php
rename to core/modules/tour/tests/src/Functional/TourTest.php
index 36a5c77..16b86c4 100644
--- a/core/modules/tour/src/Tests/TourTest.php
+++ b/core/modules/tour/tests/src/Functional/TourTest.php
@@ -2,6 +2,7 @@
namespace Drupal\Tests\tour\Functional;
+use Drupal\Core\Url;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\tour\Entity\Tour;
@@ -25,7 +26,7 @@ class TourTest extends TourTestBasic {
* @var array
* A list of permissions.
*/
- protected $permissions = array('access tour', 'administer languages');
+ protected $permissions = ['access tour', 'administer languages'];
/**
* Tour tip attributes to be tested. Keyed by the path.
@@ -33,9 +34,9 @@ class TourTest extends TourTestBasic {
* @var array
* An array of tip attributes, keyed by path.
*/
- protected $tips = array(
- 'tour-test-1' => array(),
- );
+ protected $tips = [
+ 'tour-test-1' => [],
+ ];
/**
* {@inheritdoc}
@@ -57,40 +58,40 @@ public function testTourFunctionality() {
$this->drupalGet('tour-test-1');
// Test the TourTestBase class assertTourTips() method.
- $tips = array();
- $tips[] = array('data-id' => 'tour-test-1');
- $tips[] = array('data-class' => 'tour-test-5');
+ $tips = [];
+ $tips[] = ['data-id' => 'tour-test-1'];
+ $tips[] = ['data-class' => 'tour-test-5'];
$this->assertTourTips($tips);
$this->assertTourTips();
- $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./p//a[@href=:href and contains(., :text)]]', array(
+ $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./p//a[@href=:href and contains(., :text)]]', [
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1',
':data_id' => 'tour-test-1',
- ':href' => \Drupal::url('', [], ['absolute' => TRUE]),
+ ':href' => Url::fromRoute('', [], ['absolute' => TRUE])->toString(),
':text' => 'Drupal',
- ));
- $this->assertEqual(count($elements), 1, 'Found Token replacement.');
+ ]);
+ $this->assertEquals(count($elements), 1, 'Found Token replacement.');
$elements = $this->cssSelect("li[data-id=tour-test-1] h2:contains('The first tip')");
- $this->assertEqual(count($elements), 1, 'Found English variant of tip 1.');
+ $this->assertEquals(count($elements), 1, 'Found English variant of tip 1.');
$elements = $this->cssSelect("li[data-id=tour-test-2] h2:contains('The quick brown fox')");
- $this->assertNotEqual(count($elements), 1, 'Did not find English variant of tip 2.');
+ $this->assertNotEquals(count($elements), 1, 'Did not find English variant of tip 2.');
$elements = $this->cssSelect("li[data-id=tour-test-1] h2:contains('La pioggia cade in spagna')");
- $this->assertNotEqual(count($elements), 1, 'Did not find Italian variant of tip 1.');
+ $this->assertNotEquals(count($elements), 1, 'Did not find Italian variant of tip 1.');
// Ensure that plugins work.
$elements = $this->xpath('//img[@src="http://local/image.png"]');
- $this->assertEqual(count($elements), 1, 'Image plugin tip found.');
+ $this->assertEquals(count($elements), 1, 'Image plugin tip found.');
// Navigate to tour-test-2/subpath and verify the tour_test_2 tip is found.
$this->drupalGet('tour-test-2/subpath');
$elements = $this->cssSelect("li[data-id=tour-test-2] h2:contains('The quick brown fox')");
- $this->assertEqual(count($elements), 1, 'Found English variant of tip 2.');
+ $this->assertEquals(count($elements), 1, 'Found English variant of tip 2.');
$elements = $this->cssSelect("li[data-id=tour-test-1] h2:contains('The first tip')");
- $this->assertNotEqual(count($elements), 1, 'Did not find English variant of tip 1.');
+ $this->assertNotEquals(count($elements), 1, 'Did not find English variant of tip 1.');
// Enable Italian language and navigate to it/tour-test1 and verify italian
// version of tip is found.
@@ -98,91 +99,91 @@ public function testTourFunctionality() {
$this->drupalGet('it/tour-test-1');
$elements = $this->cssSelect("li[data-id=tour-test-1] h2:contains('La pioggia cade in spagna')");
- $this->assertEqual(count($elements), 1, 'Found Italian variant of tip 1.');
+ $this->assertEquals(count($elements), 1, 'Found Italian variant of tip 1.');
$elements = $this->cssSelect("li[data-id=tour-test-2] h2:contains('The quick brown fox')");
- $this->assertNotEqual(count($elements), 1, 'Did not find English variant of tip 1.');
+ $this->assertNotEquals(count($elements), 1, 'Did not find English variant of tip 1.');
// Programmatically create a tour for use through the remainder of the test.
- $tour = Tour::create(array(
+ $tour = Tour::create([
'id' => 'tour-entity-create-test-en',
'label' => 'Tour test english',
'langcode' => 'en',
'module' => 'system',
- 'routes' => array(
- array('route_name' => 'tour_test.1'),
- ),
- 'tips' => array(
- 'tour-test-1' => array(
+ 'routes' => [
+ ['route_name' => 'tour_test.1'],
+ ],
+ 'tips' => [
+ 'tour-test-1' => [
'id' => 'tour-code-test-1',
'plugin' => 'text',
'label' => 'The rain in spain',
'body' => 'Falls mostly on the plain.',
'weight' => '100',
- 'attributes' => array(
+ 'attributes' => [
'data-id' => 'tour-code-test-1',
- ),
- ),
- 'tour-code-test-2' => array(
+ ],
+ ],
+ 'tour-code-test-2' => [
'id' => 'tour-code-test-2',
'plugin' => 'image',
'label' => 'The awesome image',
'url' => 'http://local/image.png',
'weight' => 1,
- 'attributes' => array(
+ 'attributes' => [
'data-id' => 'tour-code-test-2'
- ),
- ),
- ),
- ));
+ ],
+ ],
+ ],
+ ]);
$tour->save();
// Ensure that a tour entity has the expected dependencies based on plugin
// providers and the module named in the configuration entity.
$dependencies = $tour->calculateDependencies()->getDependencies();
- $this->assertEqual($dependencies['module'], array('system', 'tour_test'));
+ $this->assertEquals($dependencies['module'], ['system', 'tour_test']);
$this->drupalGet('tour-test-1');
// Load it back from the database and verify storage worked.
$entity_save_tip = Tour::load('tour-entity-create-test-en');
// Verify that hook_ENTITY_TYPE_load() integration worked.
- $this->assertEqual($entity_save_tip->loaded, 'Load hooks work');
+ $this->assertEquals($entity_save_tip->loaded, 'Load hooks work');
// Verify that hook_ENTITY_TYPE_presave() integration worked.
- $this->assertEqual($entity_save_tip->label(), 'Tour test english alter');
+ $this->assertEquals($entity_save_tip->label(), 'Tour test english alter');
// Navigate to tour-test-1 and verify the new tip is found.
$this->drupalGet('tour-test-1');
$elements = $this->cssSelect("li[data-id=tour-code-test-1] h2:contains('The rain in spain')");
- $this->assertEqual(count($elements), 1, 'Found the required tip markup for tip 4');
+ $this->assertEquals(count($elements), 1, 'Found the required tip markup for tip 4');
// Verify that the weight sorting works by ensuring the lower weight item
// (tip 4) has the 'End tour' button.
$elements = $this->cssSelect("li[data-id=tour-code-test-1][data-text='End tour']");
- $this->assertEqual(count($elements), 1, 'Found code tip was weighted last and had "End tour".');
+ $this->assertEquals(count($elements), 1, 'Found code tip was weighted last and had "End tour".');
// Test hook_tour_alter().
- $this->assertText('Altered by hook_tour_tips_alter');
+ $this->assertSession()->pageTextContains('Altered by hook_tour_tips_alter');
// Navigate to tour-test-3 and verify the tour_test_1 tip is found with
// appropriate classes.
$this->drupalGet('tour-test-3/foo');
- $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./h2[contains(., :text)]]', array(
+ $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./h2[contains(., :text)]]', [
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1',
':data_id' => 'tour-test-1',
':text' => 'The first tip',
- ));
- $this->assertEqual(count($elements), 1, 'Found English variant of tip 1.');
+ ]);
+ $this->assertEquals(count($elements), 1, 'Found English variant of tip 1.');
// Navigate to tour-test-3 and verify the tour_test_1 tip is not found with
// appropriate classes.
$this->drupalGet('tour-test-3/bar');
- $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./h2[contains(., :text)]]', array(
+ $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./h2[contains(., :text)]]', [
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1',
':data_id' => 'tour-test-1',
':text' => 'The first tip',
- ));
- $this->assertEqual(count($elements), 0, 'Did not find English variant of tip 1.');
+ ]);
+ $this->assertEquals(count($elements), 0, 'Did not find English variant of tip 1.');
}
}
diff --git a/core/modules/tour/tests/src/Kernel/TourPluginTest.php b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
index 9278e2e..835c8b6 100644
--- a/core/modules/tour/tests/src/Kernel/TourPluginTest.php
+++ b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
@@ -16,7 +16,7 @@ class TourPluginTest extends KernelTestBase {
*
* @var array
*/
- public static $modules = array('tour');
+ public static $modules = ['tour'];
/**
* Stores the tour plugin manager.
@@ -28,7 +28,7 @@ class TourPluginTest extends KernelTestBase {
protected function setUp() {
parent::setUp();
- $this->installConfig(array('tour'));
+ $this->installConfig(['tour']);
$this->pluginManager = $this->container->get('plugin.manager.tour.tip');
}
@@ -36,7 +36,7 @@ protected function setUp() {
* Test tour plugins.
*/
public function testTourPlugins() {
- $this->assertIdentical(count($this->pluginManager->getDefinitions()), 1, 'Only tour plugins for the enabled modules were returned.');
+ $this->assertSame(count($this->pluginManager->getDefinitions()), 1, 'Only tour plugins for the enabled modules were returned.');
}
}
diff --git a/core/modules/tour/tests/src/Unit/Entity/TourTest.php b/core/modules/tour/tests/src/Unit/Entity/TourTest.php
index 2c71aa9..08944ee 100644
--- a/core/modules/tour/tests/src/Unit/Entity/TourTest.php
+++ b/core/modules/tour/tests/src/Unit/Entity/TourTest.php
@@ -29,7 +29,7 @@ class TourTest extends UnitTestCase {
public function testHasMatchingRoute($routes, $route_name, $route_params, $result) {
$tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour')
->disableOriginalConstructor()
- ->setMethods(array('getRoutes'))
+ ->setMethods(['getRoutes'])
->getMock();
$tour->expects($this->any())
@@ -45,94 +45,94 @@ public function testHasMatchingRoute($routes, $route_name, $route_params, $resul
* Provides sample routes for testing.
*/
public function routeProvider() {
- return array(
+ return [
// Simple match.
- array(
- array(
- array('route_name' => 'some.route'),
- ),
+ [
+ [
+ ['route_name' => 'some.route'],
+ ],
'some.route',
- array(),
+ [],
TRUE,
- ),
+ ],
// Simple non-match.
- array(
- array(
- array('route_name' => 'another.route'),
- ),
+ [
+ [
+ ['route_name' => 'another.route'],
+ ],
'some.route',
- array(),
+ [],
FALSE,
- ),
+ ],
// Empty params.
- array(
- array(
- array(
+ [
+ [
+ [
'route_name' => 'some.route',
- 'route_params' => array('foo' => 'bar'),
- ),
- ),
+ 'route_params' => ['foo' => 'bar'],
+ ],
+ ],
'some.route',
- array(),
+ [],
FALSE,
- ),
+ ],
// Match on params.
- array(
- array(
- array(
+ [
+ [
+ [
'route_name' => 'some.route',
- 'route_params' => array('foo' => 'bar'),
- ),
- ),
+ 'route_params' => ['foo' => 'bar'],
+ ],
+ ],
'some.route',
- array('foo' => 'bar'),
+ ['foo' => 'bar'],
TRUE,
- ),
+ ],
// Non-matching params.
- array(
- array(
- array(
+ [
+ [
+ [
'route_name' => 'some.route',
- 'route_params' => array('foo' => 'bar'),
- ),
- ),
+ 'route_params' => ['foo' => 'bar'],
+ ],
+ ],
'some.route',
- array('bar' => 'foo'),
+ ['bar' => 'foo'],
FALSE,
- ),
+ ],
// One matching, one not.
- array(
- array(
- array(
+ [
+ [
+ [
'route_name' => 'some.route',
- 'route_params' => array('foo' => 'bar'),
- ),
- array(
+ 'route_params' => ['foo' => 'bar'],
+ ],
+ [
'route_name' => 'some.route',
- 'route_params' => array('bar' => 'foo'),
- ),
- ),
+ 'route_params' => ['bar' => 'foo'],
+ ],
+ ],
'some.route',
- array('bar' => 'foo'),
+ ['bar' => 'foo'],
TRUE,
- ),
+ ],
// One matching, one not.
- array(
- array(
- array(
+ [
+ [
+ [
'route_name' => 'some.route',
- 'route_params' => array('foo' => 'bar'),
- ),
- array(
+ 'route_params' => ['foo' => 'bar'],
+ ],
+ [
'route_name' => 'some.route',
- 'route_params' => array('foo' => 'baz'),
- ),
- ),
+ 'route_params' => ['foo' => 'baz'],
+ ],
+ ],
'some.route',
- array('foo' => 'baz'),
+ ['foo' => 'baz'],
TRUE,
- ),
- );
+ ],
+ ];
}
}
diff --git a/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php b/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php
index 87b817d..56505aa 100644
--- a/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php
+++ b/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php
@@ -18,56 +18,56 @@ class TourTestController {
* Array of markup.
*/
public function tourTest1($locale = 'foo') {
- return array(
- 'tip-1' => array(
+ return [
+ 'tip-1' => [
'#type' => 'container',
- '#attributes' => array(
+ '#attributes' => [
'id' => 'tour-test-1',
- ),
+ ],
'#children' => t('Where does the rain in Spain fail?'),
- ),
- 'tip-3' => array(
+ ],
+ 'tip-3' => [
'#type' => 'container',
- '#attributes' => array(
+ '#attributes' => [
'id' => 'tour-test-3',
- ),
+ ],
'#children' => t('Tip created now?'),
- ),
- 'tip-4' => array(
+ ],
+ 'tip-4' => [
'#type' => 'container',
- '#attributes' => array(
+ '#attributes' => [
'id' => 'tour-test-4',
- ),
+ ],
'#children' => t('Tip created later?'),
- ),
- 'tip-5' => array(
+ ],
+ 'tip-5' => [
'#type' => 'container',
- '#attributes' => array(
- 'class' => array('tour-test-5'),
- ),
+ '#attributes' => [
+ 'class' => ['tour-test-5'],
+ ],
'#children' => t('Tip created later?'),
- ),
- 'code-tip-1' => array(
+ ],
+ 'code-tip-1' => [
'#type' => 'container',
- '#attributes' => array(
+ '#attributes' => [
'id' => 'tour-code-test-1',
- ),
+ ],
'#children' => t('Tip created now?'),
- ),
- );
+ ],
+ ];
}
/**
* Outputs some content for testing tours.
*/
public function tourTest2() {
- return array(
+ return [
'#type' => 'container',
- '#attributes' => array(
+ '#attributes' => [
'id' => 'tour-test-2',
- ),
+ ],
'#children' => t('Pangram example'),
- );
+ ];
}
diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php
index 45869ab..5c09e60 100644
--- a/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -227,7 +227,7 @@ public function titleEquals($expected_title) {
*/
public function linkExists($label, $index = 0, $message = '') {
$message = ($message ? $message : strtr('Link with label %label found.', ['%label' => $label]));
- $links = $this->session->getPage()->findAll('named', ['link', $label]);
+ $links = $this->session->getPage()->findAll('named_exact', ['link', $label]);
$this->assert(!empty($links[$index]), $message);
}