diff --git a/core/modules/tour/tests/src/Functional/TourTestBase.php b/core/modules/tour/tests/src/Functional/TourTestBase.php index 11fe2e0..3bad718 100644 --- a/core/modules/tour/tests/src/Functional/TourTestBase.php +++ b/core/modules/tour/tests/src/Functional/TourTestBase.php @@ -54,11 +54,11 @@ public function assertTourTips($tips = array()) { foreach ($tips as $tip) { if (!empty($tip['data-id'])) { $elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $raw_content, TRUE); - $this->assertCount(1, $elements); + $this->assertTrue(!empty($elements) && count($elements) === 1, format_string('Found corresponding page element for tour tip with id #%data-id', array('%data-id' => $tip['data-id']))); } elseif (!empty($tip['data-class'])) { $elements = \PHPUnit_Util_XML::cssSelect('.' . $tip['data-class'], TRUE, $raw_content, TRUE); - $this->assertNotEmpty($elements); + $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', array('%data-class' => $tip['data-class']))); } else { // It's a modal.