Skip to content

Commit 2ea2167

Browse files
committed
Add testcase for source's srcset attribute
Signed-off-by: Kevin Decherf <[email protected]>
1 parent da043c2 commit 2ea2167

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/HTMLawedTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,12 @@ public function testImgSrcsetAttribute($input, $expectedOutput = null)
3434

3535
$this->assertSame($expectedOutput ?: $input, $output);
3636
}
37+
38+
public function testPictureBlocks()
39+
{
40+
$input = '<div><picture><source srcset="a.jpg, c.jpg 405w" /><img src="z.jpg" alt="image" /></picture></div>';
41+
42+
$output = htmLawed($input);
43+
$this->assertSame($input, $output);
44+
}
3745
}

0 commit comments

Comments
 (0)