5
1
Fork 0
mirror of https://github.com/Anvilcraft/jensmemes synced 2024-11-12 13:01:30 +01:00
jensmemes/website/api/tinify-php-master/test/TinifyResultMetaTest.php
2020-07-21 23:07:16 +02:00

20 lines
729 B
PHP

<?php
use Tinify\CurlMock;
class TinifyResultMetaTest extends TestCase {
public function testWithMetadataWidthShouldReturnImageWidth() {
$result = new Tinify\ResultMeta(array("image-width" => "100"));
$this->assertSame(100, $result->width());
}
public function testWithMetadataHeightShouldReturnImageHeight() {
$result = new Tinify\ResultMeta(array("image-height" => "60"));
$this->assertSame(60, $result->height());
}
public function testWithMetadataLocationShouldReturnImageLocation() {
$result = new Tinify\ResultMeta(array("location" => "https://example.com/image.png"));
$this->assertSame("https://example.com/image.png", $result->location());
}
}