diff core/modules/tour/tests/src/Functional/TourTestBase.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/tour/tests/src/Functional/TourTestBase.php	Fri Feb 23 15:51:18 2018 +0000
+++ b/core/modules/tour/tests/src/Functional/TourTestBase.php	Fri Feb 23 15:52:07 2018 +0000
@@ -50,14 +50,13 @@
       // 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, $raw_content, TRUE);
+          $elements = $this->getSession()->getPage()->findAll('css', '#' . $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, $raw_content, TRUE);
+          $elements = $this->getSession()->getPage()->findAll('css', '.' . $tip['data-class']);
           $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', ['%data-class' => $tip['data-class']]));
         }
         else {