Skip to content

Commit e26475f

Browse files
committed
fixup! Add tests and CI workflow for phpunit
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
1 parent e012d63 commit e26475f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/HTMLawedTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,27 @@
44

55
class HTMLawedTest extends TestCase
66
{
7-
public function dataForImgSrcsetAttribute() {
7+
public function dataForImgSrcsetAttribute()
8+
{
89
return [
910
'srcset with width descriptor' => [
10-
'<div><img src="a.jpg" alt="image a" srcset="a.jpg 100w, b.jpg 450w" /></div>'
11+
'<div><img src="a.jpg" alt="image a" srcset="a.jpg 100w, b.jpg 450w" /></div>',
1112
],
1213
'srcset with pixel ratio density' => [
13-
'<div><img src="a.jpg" alt="image a" srcset="a.jpg, b.jpg 1.5x, c.jpg 2x" /></div>'
14+
'<div><img src="a.jpg" alt="image a" srcset="a.jpg, b.jpg 1.5x, c.jpg 2x" /></div>',
1415
],
1516
'srcset with invalid descriptor' => [
1617
'<div><img src="a.jpg" alt="image a" srcset=" a.jpg , b.jpg x2" /></div>',
17-
'<div><img src="a.jpg" alt="image a" srcset="a.jpg, b.jpg, x2" /></div>'
18+
'<div><img src="a.jpg" alt="image a" srcset="a.jpg, b.jpg, x2" /></div>',
1819
],
1920
];
2021
}
2122

2223
/**
2324
* @dataProvider dataForImgSrcsetAttribute
2425
*/
25-
public function testImgSrcsetAttribute($input, $expectedOutput = null) {
26+
public function testImgSrcsetAttribute($input, $expectedOutput = null)
27+
{
2628
$output = htmLawed($input);
2729

2830
$this->assertSame($output, $expectedOutput ?: $input);

0 commit comments

Comments
 (0)