Skip to content

Commit

Permalink
Test allowwebp
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickinthebox committed May 31, 2024
1 parent 1f48ca3 commit 722ad19
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/Units/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,15 @@ public function testBuildHttpDoesNotInterferWithInstance()

$this->assertSame('//img.mapado.net/' . $baseUrl, $this->manager->buildUrl($baseUrl));
}

public function testAllowwebp(): void
{
$baseUrl = '//img.mapado.net/2014/1/1/my-image.png';
$url = $this->manager->buildUrl($baseUrl, null, null);
$this->assertSame($baseUrl, $url);

$baseUrl = '//img.mapado.net/2014/1/1/my-image.png';
$url = $this->manager->buildUrl($baseUrl, null, null, ['allowwebp' => 1]);
$this->assertSame($baseUrl . '_thumbs/0-0.png', $url);
}
}

0 comments on commit 722ad19

Please sign in to comment.