diff --git a/core/modules/language/src/Tests/LanguageTourTest.php b/core/modules/language/tests/src/Functional/LanguageTourTest.php
similarity index 93%
rename from core/modules/language/src/Tests/LanguageTourTest.php
rename to core/modules/language/tests/src/Functional/LanguageTourTest.php
index b11006ec3e..13b29f2ef5 100644
--- a/core/modules/language/src/Tests/LanguageTourTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageTourTest.php
@@ -1,8 +1,8 @@
assertText($title);
- $this->assertNoLink($title);
+ $this->assertSession()->linkNotExistsExact($title);
}
else {
$this->assertNoText($title);
diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php
similarity index 99%
rename from core/modules/tour/src/Tests/TourTest.php
rename to core/modules/tour/tests/src/Functional/TourTest.php
index 749e7c5a3e..55f3743f61 100644
--- a/core/modules/tour/src/Tests/TourTest.php
+++ b/core/modules/tour/tests/src/Functional/TourTest.php
@@ -1,6 +1,6 @@
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'];
+ $tips[] = [
+ 'data-id' => $rendered_tip->getAttribute('data-id'),
+ 'data-class' => $rendered_tip->getAttribute('data-class'),
+ ];
}
}
@@ -48,13 +50,14 @@ public function assertTourTips($tips = []) {
// Check for corresponding page elements.
$total = 0;
$modals = 0;
+ $raw_content = $this->getSession()->getPage()->getContent();
foreach ($tips as $tip) {
if (!empty($tip['data-id'])) {
- $elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $this->content, TRUE);
+ $elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $raw_content, TRUE);
$this->assertTrue(!empty($elements) && count($elements) === 1, format_string('Found corresponding page element for tour tip with id #%data-id', ['%data-id' => $tip['data-id']]));
}
elseif (!empty($tip['data-class'])) {
- $elements = \PHPUnit_Util_XML::cssSelect('.' . $tip['data-class'], TRUE, $this->content, TRUE);
+ $elements = \PHPUnit_Util_XML::cssSelect('.' . $tip['data-class'], TRUE, $raw_content, TRUE);
$this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', ['%data-class' => $tip['data-class']]));
}
else {
diff --git a/core/modules/tour/src/Tests/TourTestBasic.php b/core/modules/tour/tests/src/Functional/TourTestBasic.php
similarity index 97%
rename from core/modules/tour/src/Tests/TourTestBasic.php
rename to core/modules/tour/tests/src/Functional/TourTestBasic.php
index 1db8bc5c6a..ca188d7075 100644
--- a/core/modules/tour/src/Tests/TourTestBasic.php
+++ b/core/modules/tour/tests/src/Functional/TourTestBasic.php
@@ -1,6 +1,6 @@