X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftour%2Fsrc%2FTests%2FTourTestBase.php;fp=web%2Fcore%2Fmodules%2Ftour%2Fsrc%2FTests%2FTourTestBase.php;h=eca2ef8a1574df73eef839fea0e2ce3f93e9c696;hp=e13965070678647069f2496e87126ef19f18b6cb;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/tour/src/Tests/TourTestBase.php b/web/core/modules/tour/src/Tests/TourTestBase.php index e13965070..eca2ef8a1 100644 --- a/web/core/modules/tour/src/Tests/TourTestBase.php +++ b/web/core/modules/tour/src/Tests/TourTestBase.php @@ -55,11 +55,11 @@ abstract class TourTestBase extends WebTestBase { $modals = 0; foreach ($tips as $tip) { if (!empty($tip['data-id'])) { - $elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $this->content, TRUE); + $elements = $this->xpath('//*[@id="' . $tip['data-id'] . '"]'); $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 = $this->xpath('//*[contain(@class, "' . $tip['data-id'] . '")]'); $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', ['%data-class' => $tip['data-class']])); } else {