Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcorieser committed Dec 22, 2024
1 parent 1bf5aac commit 3cec01e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Imaging/GlideUrlBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Statamic\Assets\Asset;
use Statamic\Assets\AssetContainer;
use Statamic\Imaging\GlideUrlBuilder;
use Statamic\Support\Str;
use Tests\TestCase;

class GlideUrlBuilderTest extends TestCase
Expand Down Expand Up @@ -54,7 +55,7 @@ public function testAsset()
$asset->container((new AssetContainer)->handle('main'));
$asset->path('img/foo.jpg');

$encoded = base64_encode('main/img/foo.jpg');
$encoded = Str::toBase64Url('main/img/foo.jpg');

$this->assertEquals(
"/img/asset/$encoded/foo.jpg?w=100",
Expand All @@ -64,7 +65,7 @@ public function testAsset()

public function testId()
{
$encoded = base64_encode('main/img/foo.jpg');
$encoded = Str::toBase64Url('main/img/foo.jpg');

$this->assertEquals(
"/img/asset/$encoded?w=100",
Expand All @@ -78,7 +79,7 @@ public function testConfigAddsFilename()
$asset->container((new AssetContainer)->handle('main'));
$asset->path('img/foo.jpg');

$encoded = base64_encode('main/img/foo.jpg');
$encoded = Str::toBase64Url('main/img/foo.jpg');

$this->assertEquals(
"/img/asset/$encoded/foo.jpg?w=100",
Expand All @@ -92,7 +93,7 @@ public function testMarkWithAsset()
$asset->container((new AssetContainer)->handle('main'));
$asset->path('img/foo.jpg');

$encoded = rawurlencode(base64_encode('main/img/foo.jpg'));
$encoded = rawurlencode(Str::toBase64Url('main/img/foo.jpg'));

$this->assertEquals(
"/img/foo.jpg?w=100&mark=asset%3A%3A$encoded",
Expand Down

0 comments on commit 3cec01e

Please sign in to comment.