diff -u b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php --- b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php +++ b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php @@ -112,9 +112,9 @@ $this->assertSession()->elementTextContains('css', 'fieldset#edit-age-wrapper', 'Age between'); // Check the min/max labels. $min_element_label = $this->xpath('//fieldset[contains(@id, "edit-age-wrapper")]//label[contains(@for, "edit-age-min") and contains(text(), "Min")]'); - $this->assertTrue(!empty($min_element_label)); + $this->assertCount(1, $min_element_label); $max_element_label = $this->xpath('//fieldset[contains(@id, "edit-age-wrapper")]//label[contains(@for, "edit-age-max") and contains(text(), "Max")]'); - $this->assertTrue(!empty($max_element_label)); + $this->assertCount(1, $max_element_label); // Check that the description is shown in the right place. $this->assertEquals(trim($this->cssSelect('#edit-age-wrapper--description')[0]->getText()), 'Description of the exposed filter'); @@ -133,7 +133,7 @@ // Make sure the label is visible and that there's no fieldset wrapper. $label = $this->xpath('//label[contains(@for, "edit-age") and contains(text(), "Age greater than")]'); - $this->assertTrue(!empty($label)); + $this->assertCount(1, $label); $fieldset = $this->xpath('//fieldset[contains(@id, "edit-age-wrapper")]'); $this->assertTrue(empty($fieldset)); }