| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function testParser() |
||
| 31 | { |
||
| 32 | $siteChecker = SiteChecker::create(); |
||
| 33 | $html = '<a href="/xxx"></a><img src="/yyy">'; |
||
| 34 | |||
| 35 | /** @var Asset[] $assets */ |
||
| 36 | $assets = self::callMethod( |
||
| 37 | $siteChecker, |
||
| 38 | 'getAllAssets', |
||
| 39 | array($html, null) |
||
| 40 | ); |
||
| 41 | |||
| 42 | $link = $assets[0]; |
||
| 43 | $this->assertEquals('/xxx', $link->getPath()); |
||
| 44 | $this->assertEquals('page', $link->getType()); |
||
| 45 | |||
| 46 | $image = $assets[1]; |
||
| 47 | $this->assertEquals('/yyy', $image->getPath()); |
||
| 48 | $this->assertEquals('image', $image->getType()); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |