|
4 | 4 |
|
5 | 5 | class HTMLawedTest extends TestCase |
6 | 6 | { |
7 | | - public function dataForImgSrcsetAttribute() { |
| 7 | + public function dataForImgSrcsetAttribute() |
| 8 | + { |
8 | 9 | return [ |
9 | 10 | '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>', |
11 | 12 | ], |
12 | 13 | '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>', |
14 | 15 | ], |
15 | 16 | 'srcset with invalid descriptor' => [ |
16 | 17 | '<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>', |
18 | 19 | ], |
19 | 20 | ]; |
20 | 21 | } |
21 | 22 |
|
22 | 23 | /** |
23 | 24 | * @dataProvider dataForImgSrcsetAttribute |
24 | 25 | */ |
25 | | - public function testImgSrcsetAttribute($input, $expectedOutput = null) { |
| 26 | + public function testImgSrcsetAttribute($input, $expectedOutput = null) |
| 27 | + { |
26 | 28 | $output = htmLawed($input); |
27 | 29 |
|
28 | 30 | $this->assertSame($output, $expectedOutput ?: $input); |
|
0 commit comments