Skip to content

Commit 41c1e63

Browse files
committed
test: add test for id="0"
1 parent 762ca83 commit 41c1e63

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/system/Test/DOMParserTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ public function testSeeElementID(): void
171171
$this->assertTrue($dom->see('Hello World', '#heading'));
172172
}
173173

174+
public function testSeeElementIDZero(): void
175+
{
176+
$dom = new DOMParser();
177+
178+
$html = '<html><body><h1 id="0">Hello World Wide Web</h1></body></html>';
179+
$dom->withString($html);
180+
181+
$this->assertTrue($dom->see('Hello World', '#0'));
182+
}
183+
174184
public function testSeeElementIDFails(): void
175185
{
176186
$dom = new DOMParser();

0 commit comments

Comments
 (0)