| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function testConvertBlockquoteToJson() |
||
| 23 | { |
||
| 24 | $htmlToJson = new HtmlToJson(); |
||
| 25 | $htmlToJson->addConverter(new BlockquoteConverter()); |
||
| 26 | |||
| 27 | // with cite |
||
| 28 | $this->assertEquals( |
||
| 29 | $htmlToJson->toJson('<blockquote><p>Text</p><cite>Cite</cite></blockquote>'), |
||
| 30 | '{"data":[{"type":"quote","data":{"text":" Text","cite":" Cite"}}]}' |
||
| 31 | ); |
||
| 32 | |||
| 33 | // without cite |
||
| 34 | $this->assertEquals( |
||
| 35 | $htmlToJson->toJson('<blockquote><p>Text</p></blockquote>'), |
||
| 36 | '{"data":[{"type":"quote","data":{"text":" Text","cite":""}}]}' |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 50 |