2021-08-10 11:19:58 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Test\Unit\Helpers;
|
|
|
|
|
|
|
|
use Engelsystem\Helpers\Assets;
|
|
|
|
use Engelsystem\Test\Unit\TestCase;
|
|
|
|
|
|
|
|
class AssetsTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Helpers\Assets::__construct
|
|
|
|
* @covers \Engelsystem\Helpers\Assets::getAssetPath
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testGetAssetPath(): void
|
2021-08-10 11:19:58 +02:00
|
|
|
{
|
|
|
|
$assets = new Assets('/foo/bar');
|
|
|
|
$this->assertEquals('lorem.bar', $assets->getAssetPath('lorem.bar'));
|
|
|
|
|
|
|
|
$assets = new Assets(__DIR__ . '/Stub/files');
|
|
|
|
$this->assertEquals('something.xyz', $assets->getAssetPath('something.xyz'));
|
|
|
|
$this->assertEquals('lorem-hashed.ipsum', $assets->getAssetPath('foo.bar'));
|
|
|
|
}
|
|
|
|
}
|