| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function fetchSizeTest() |
||
| 13 | {
|
||
| 14 | $pictureParser = new PictureParser(); |
||
| 15 | |||
| 16 | $images = ['https://raw.githubusercontent.com/nexuslinkservices/image-size-finder/master/web/samples/sample_image.png']; |
||
| 17 | $actualResult = $pictureParser->fetchSize($images); |
||
| 18 | |||
| 19 | $expectedResult = [ |
||
| 20 | "url"=> "https://raw.githubusercontent.com/nexuslinkservices/image-size-finder/master/web/samples/sample_image.png", |
||
| 21 | "size"=> 82966, |
||
| 22 | "height"=> 512, |
||
| 23 | "width"=> 512, |
||
| 24 | "valid"=> true |
||
| 25 | ]; |
||
| 26 | |||
| 27 | $this->assertEquals($expectedResult, $actualResult[0]); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |