Mercurial > hg > isophonics-drupal-site
diff core/modules/tour/src/Tests/TourTestBase.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/modules/tour/src/Tests/TourTestBase.php Mon Apr 23 09:33:26 2018 +0100 +++ b/core/modules/tour/src/Tests/TourTestBase.php Mon Apr 23 09:46:53 2018 +0100 @@ -55,11 +55,11 @@ $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 {