diff -u b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php --- b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php +++ b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php @@ -54,7 +54,7 @@ $this->verifyPageCache($url, 'HIT', $expected_tags); // Verify that after modifying the tour, there is a cache miss. - $this->assertTrue('Test modification of tour.', 'Debug'); + $this->pass('Test modification of tour.', 'Debug'); Tour::load('tour-test')->save(); $this->verifyPageCache($url, 'MISS'); @@ -62,7 +62,7 @@ $this->verifyPageCache($url, 'HIT', $expected_tags); // Verify that after deleting the tour, there is a cache miss. - $this->assertTrue('Test deletion of tour.', 'Debug'); + $this->pass('Test deletion of tour.', 'Debug'); Tour::load('tour-test')->delete(); $this->verifyPageCache($url, 'MISS'); diff -u b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php --- b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php +++ b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php @@ -66,14 +66,14 @@ $this->drupalGet('admin/help'); // All users should be able to see the module section. - $this->assertSession()->pageTextContains('Module overviews are provided by modules'); + $this->assertText('Module overviews are provided by modules'); foreach ($this->getModuleList() as $name) { - $this->assertSession()->linkExists($name); + $this->assertLink($name); } // Some users should be able to see the tour section. if ($tours_ok) { - $this->assertSession()->pageTextContains('Tours guide you through workflows'); + $this->assertText('Tours guide you through workflows'); } else { $this->assertSession()->pageTextNotContains('Tours guide you through workflows'); @@ -84,7 +84,7 @@ // Test the titles that should be links. foreach ($titles[0] as $title) { if ($tours_ok) { - $this->assertSession()->linkExists($title); + $this->assertLink($title); } else { $this->assertSession()->linkNotExists($title); @@ -100,7 +100,7 @@ // Test the titles that should not be links. foreach ($titles[1] as $title) { if ($tours_ok) { - $this->assertSession()->pageTextContains($title); + $this->assertText($title); $this->assertSession()->linkNotExists($title); } else { diff -u b/core/modules/tour/tests/src/Functional/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php --- b/core/modules/tour/tests/src/Functional/TourTest.php +++ b/core/modules/tour/tests/src/Functional/TourTest.php @@ -34,9 +34,10 @@ * @var array * An array of tip attributes, keyed by path. */ - protected $tips = [ - 'tour-test-1' => [], - ]; + + protected $tips = array( + 'tour-test-1' => array(), + ); /** * {@inheritdoc} @@ -58,9 +59,9 @@ $this->drupalGet('tour-test-1'); // Test the TourTestBase class assertTourTips() method. - $tips = []; - $tips[] = ['data-id' => 'tour-test-1']; - $tips[] = ['data-class' => 'tour-test-5']; + $tips = array(); + $tips[] = array('data-id' => 'tour-test-1'); + $tips[] = array('data-class' => 'tour-test-5'); $this->assertTourTips($tips); $this->assertTourTips(); @@ -163,7 +164,7 @@ $this->assertEquals(count($elements), 1, 'Found code tip was weighted last and had "End tour".'); // Test hook_tour_alter(). - $this->assertSession()->pageTextContains('Altered by hook_tour_tips_alter'); + $this->assertText('Altered by hook_tour_tips_alter'); // Navigate to tour-test-3 and verify the tour_test_1 tip is found with // appropriate classes. diff -u b/core/modules/tour/tests/src/Functional/TourTestBase.php b/core/modules/tour/tests/src/Functional/TourTestBase.php --- b/core/modules/tour/tests/src/Functional/TourTestBase.php +++ b/core/modules/tour/tests/src/Functional/TourTestBase.php @@ -20,12 +20,12 @@ * // Basic example. * $this->assertTourTips(); * - * // Advanced example. The following would be used for multipage or targeting - * // a specific subset of tips. - * $tips = []; - * $tips[] = ['data-id' => 'foo']; - * $tips[] = ['data-id' => 'bar']; - * $tips[] = ['data-class' => 'baz']; + * // 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 */ @@ -66,7 +66,7 @@ } $total++; } - $this->assertTrue(TRUE, "Total $total Tips tested of which $modals modal(s)."); + $this->pass(format_string('Total %total Tips tested of which %modals modal(s).', array('%total' => $total, '%modals' => $modals))); } } diff -u b/core/modules/tour/tests/src/Functional/TourTestBasic.php b/core/modules/tour/tests/src/Functional/TourTestBasic.php --- b/core/modules/tour/tests/src/Functional/TourTestBasic.php +++ b/core/modules/tour/tests/src/Functional/TourTestBasic.php @@ -22,7 +22,7 @@ * ]; * @endcode */ - protected $tips = []; + protected $tips = array(); /** * An admin user with administrative permissions for tour. diff -u b/core/modules/tour/tests/src/Unit/Entity/TourTest.php b/core/modules/tour/tests/src/Unit/Entity/TourTest.php --- b/core/modules/tour/tests/src/Unit/Entity/TourTest.php +++ b/core/modules/tour/tests/src/Unit/Entity/TourTest.php @@ -52,7 +52,7 @@ ['route_name' => 'some.route'], ], 'some.route', - [], + array(), TRUE, ], // Simple non-match. @@ -61,7 +61,7 @@ ['route_name' => 'another.route'], ], 'some.route', - [], + array(), FALSE, ], // Empty params. @@ -73,7 +73,7 @@ ], ], 'some.route', - [], + array(), FALSE, ], // Match on params.