Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public function testConvertImageToJson() |
||
41 | { |
||
42 | $htmlToJson = new HtmlToJson(); |
||
43 | $htmlToJson->addConverter(new ImageConverter()); |
||
44 | $this->assertEquals( |
||
45 | $htmlToJson->toJson('<img src="/path/to/img.jpg" />'), |
||
46 | '{"data":[{"type":"image","data":{"file":{"url":"\/path\/to\/img.jpg"}}}]}' |
||
47 | ); |
||
48 | } |
||
49 | } |
||
50 |