diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php index dff6270245..a896c6e29a 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php @@ -77,7 +77,7 @@ public function testMapperListPage() { // Make sure there is only a single operation for each dropbutton, either // 'List' or 'Translate'. foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) { - $this->assertIdentical(1, count($dropbutton->find('xpath', 'li'))); + $this->assertIdentical(1, count($dropbutton->findAll('xpath', 'li'))); $this->assertTrue(($dropbutton->getText() === 'Translate') || ($dropbutton->getText() === 'List')); } diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php index 72a2160e22..08d4c6e5de 100644 --- a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php +++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php @@ -345,7 +345,7 @@ public function testFieldAdminHandler() { $this->drupalPostForm(NULL, $edit, t('Save settings')); // The term should now exist. $term = taxonomy_term_load_multiple_by_name($term_name, 'tags')[1]; - $this->assertIdentical(1, count($term), 'Taxonomy term was auto created when set as field default.'); + $this->assertNotNull($term, 'Taxonomy term was auto created when set as field default.'); } /** diff --git a/core/modules/tour/tests/src/Functional/TourTestBase.php b/core/modules/tour/tests/src/Functional/TourTestBase.php index 522e8e6f36..53e884a291 100644 --- a/core/modules/tour/tests/src/Functional/TourTestBase.php +++ b/core/modules/tour/tests/src/Functional/TourTestBase.php @@ -53,11 +53,11 @@ public function assertTourTips($tips = []) { $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'], TRUE, $raw_content, TRUE); $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'], TRUE, $raw_content, TRUE); $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', ['%data-class' => $tip['data-class']])); } else {