|
|
@@ -86,23 +86,23 @@ class AssetsExtensionTest extends TestCase
|
|
|
public function testGetAssetAbsolutePath(): void
|
|
|
{
|
|
|
$assetsExtension = new AssetsExtension($this->projectDir, $this->fileManager);
|
|
|
- $publicDir = $this->projectDir . '/public';
|
|
|
+ $publicDir = $this->projectDir.'/public';
|
|
|
|
|
|
// Test with path starting with /
|
|
|
$this->assertEquals(
|
|
|
- $publicDir . '/images/logo.png',
|
|
|
+ $publicDir.'/images/logo.png',
|
|
|
$assetsExtension->getAssetAbsolutePath('/images/logo.png')
|
|
|
);
|
|
|
|
|
|
// Test with path not starting with /
|
|
|
$this->assertEquals(
|
|
|
- $publicDir . '/images/logo.png',
|
|
|
+ $publicDir.'/images/logo.png',
|
|
|
$assetsExtension->getAssetAbsolutePath('images/logo.png')
|
|
|
);
|
|
|
|
|
|
// Test with empty path
|
|
|
$this->assertEquals(
|
|
|
- $publicDir . '/',
|
|
|
+ $publicDir.'/',
|
|
|
$assetsExtension->getAssetAbsolutePath('')
|
|
|
);
|
|
|
}
|
|
|
@@ -116,7 +116,7 @@ class AssetsExtensionTest extends TestCase
|
|
|
->getMock();
|
|
|
|
|
|
// Set up the mock to return a specific path
|
|
|
- $testFilePath = sys_get_temp_dir() . '/test_image.png';
|
|
|
+ $testFilePath = sys_get_temp_dir().'/test_image.png';
|
|
|
$assetsExtension
|
|
|
->method('getAssetAbsolutePath')
|
|
|
->willReturn($testFilePath);
|
|
|
@@ -149,7 +149,7 @@ class AssetsExtensionTest extends TestCase
|
|
|
->getMock();
|
|
|
|
|
|
// Set up the mock to return a non-existent file path
|
|
|
- $nonExistentFilePath = sys_get_temp_dir() . '/non_existent_file.png';
|
|
|
+ $nonExistentFilePath = sys_get_temp_dir().'/non_existent_file.png';
|
|
|
$assetsExtension->method('getAssetAbsolutePath')
|
|
|
->willReturn($nonExistentFilePath);
|
|
|
|