Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / tour / src / Tests / TourTestBase.php
index e13965070678647069f2496e87126ef19f18b6cb..eca2ef8a1574df73eef839fea0e2ce3f93e9c696 100644 (file)
@@ -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 {