8000 [CssSelector] Improve the error message when the test fails · symfony/symfony@bd314d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd314d3

Browse files
committed
[CssSelector] Improve the error message when the test fails
1 parent 0af988d commit bd314d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testXmlLang($css, array $elementsId)
9898
$elements = $document->xpath($translator->cssToXPath($css));
9999
$this->assertCount(\count($elementsId), $elements);
100100
foreach ($elements as $element) {
101-
$this->assertTrue(\in_array($element->attributes()->id, $elementsId));
101+
$this->assertContains((string) $element->attributes()->id, $elementsId);
102102
}
103103
}
104104

@@ -116,7 +116,7 @@ public function testHtmlIds($css, array $elementsId)
116116
$this->assertCount(\count($elementsId), $elementsId);
117117
foreach ($elements as $element) {
118118
if (null !== $element->attributes()->id) {
119-
$this->assertTrue(\in_array($element->attributes()->id, $elementsId));
119+
$this->assertContains((string) $element->attributes()->id, $elementsId);
120120
}
121121
}
122122
libxml_clear_errors();

0 commit comments

Comments
 (0)
0