|
|
@@ -40,9 +40,9 @@ class TestableLocalStorage extends LocalStorage
|
|
|
return parent::getOrganizationAndPersonFromOwner($owner);
|
|
|
}
|
|
|
|
|
|
- public function getFilterFromSizeAndConfig(string $size, bool $configExist): string
|
|
|
+ public function getFilterFromSizeAndConfig(string $size, bool $crop = true): string
|
|
|
{
|
|
|
- return parent::getFilterFromSizeAndConfig($size, $configExist);
|
|
|
+ return parent::getFilterFromSizeAndConfig($size, $crop);
|
|
|
}
|
|
|
|
|
|
public function rrmDir(string $dirKey): void
|
|
|
@@ -188,7 +188,7 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(
|
|
|
'publicUrl/xyz',
|
|
|
- $localStorage->getImageUrl($file, 'sm', false)
|
|
|
+ $localStorage->getImageUrl($file, 'sm', false, false)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -222,7 +222,7 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(
|
|
|
'xyz',
|
|
|
- $localStorage->getImageUrl($file, 'sm', true)
|
|
|
+ $localStorage->getImageUrl($file, 'sm', true, false)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -247,7 +247,7 @@ class LocalStorageTest extends TestCase
|
|
|
$this->imageFactory
|
|
|
->expects(self::once())
|
|
|
->method('createImageContent')
|
|
|
- ->with($file, 'crop_sm');
|
|
|
+ ->with($file, 'crop_sm', false);
|
|
|
|
|
|
$this->cacheManager
|
|
|
->method('resolve')
|
|
|
@@ -256,7 +256,7 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(
|
|
|
'publicUrl/xyz',
|
|
|
- $localStorage->getImageUrl($file, 'sm', false)
|
|
|
+ $localStorage->getImageUrl($file, 'sm', false, false)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -281,7 +281,7 @@ class LocalStorageTest extends TestCase
|
|
|
$this->imageFactory
|
|
|
->expects(self::once())
|
|
|
->method('createImageContent')
|
|
|
- ->with($file, 'crop_sm')
|
|
|
+ ->with($file, 'crop_sm', false)
|
|
|
->willThrowException(new \Exception('File not found'));
|
|
|
|
|
|
$this->cacheManager
|
|
|
@@ -295,7 +295,7 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(
|
|
|
'publicUrl/images/missing-file.png',
|
|
|
- $localStorage->getImageUrl($file, 'sm', false)
|
|
|
+ $localStorage->getImageUrl($file, 'sm', false, false)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -320,7 +320,7 @@ class LocalStorageTest extends TestCase
|
|
|
$this->imageFactory
|
|
|
->expects(self::once())
|
|
|
->method('createImageContent')
|
|
|
- ->with($file, 'crop_sm')
|
|
|
+ ->with($file, 'crop_sm', false)
|
|
|
->willThrowException(new \Exception('File not found'));
|
|
|
|
|
|
$this->cacheManager
|
|
|
@@ -329,7 +329,7 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->assertEquals(
|
|
|
'images/missing-file.png',
|
|
|
- $localStorage->getImageUrl($file, 'sm', true)
|
|
|
+ $localStorage->getImageUrl($file, 'sm', true, false)
|
|
|
);
|
|
|
}
|
|
|
|