PHP Класс Contao\CoreBundle\Test\Image\ImageFactoryTest

Автор: Martin Auswöger ([email protected])
Наследование: extends Contao\CoreBundle\Test\TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
emptyHookCallback ( ) Returns null.
executeResizeHookCallback ( object $imageObj ) : string Returns a custom image path.
getCreateWithLegacyMode ( ) : array Provides the data for the testCreateWithLegacyMode() method.
getImageHookCallback ( string $originalPath, integer $targetWidth, integer $targetHeight, string $resizeMode, string $cacheName, object $fileObj, string $targetPath, object $imageObj ) : string Returns a custom image path.
tearDown ( )
testCreate ( ) Tests the create() method.
testCreateInvalidExtension ( ) Tests the create() method.
testCreateWithImageObjectAndEmptyResizeConfiguration ( ) Tests the create() method.
testCreateWithImageObjectAndResizeConfiguration ( ) Tests the create() method.
testCreateWithImageSize ( ) Tests the create() method.
testCreateWithLegacyMode ( string $mode, array $expected ) Tests the create() method.
testCreateWithMissingImageSize ( ) Tests the create() method.
testCreateWithoutResize ( ) Tests the create() method.
testEmptyHooks ( ) Tests empty getImage and executeResize hooks.
testExecuteResizeHook ( ) Tests the executeResize hook.
testGetImageHook ( ) Tests the getImage hook.
testGetImportantPartFromLegacyMode ( string $mode, string $expected ) Tests the getImportantPartFromLegacyMode() method.
testGetImportantPartFromLegacyModeInvalidMode ( ) Tests the getImportantPartFromLegacyMode() method throws an exception for invalid resize modes.
testInstantiation ( ) Tests the object instantiation.

Приватные методы

Метод Описание
createImageFactory ( LegacyResizer | null $resizer = null, Imagine\Image\ImagineInterface | null $imagine = null, Imagine\Image\ImagineInterface | null $imagineSvg = null, Symfony\Component\Filesystem\Filesystem | null $filesystem = null, Contao\CoreBundle\Framework\ContaoFrameworkInterface | null $framework = null, boolean $bypassCache = null, array $imagineOptions = null, string $validExtensions = null ) : ImageFactory Create an ImageFactory instance helper.

Описание методов

emptyHookCallback() публичный статический Метод

Returns null.
public static emptyHookCallback ( )

executeResizeHookCallback() публичный статический Метод

Returns a custom image path.
public static executeResizeHookCallback ( object $imageObj ) : string
$imageObj object The image object
Результат string The image path

getCreateWithLegacyMode() публичный Метод

Provides the data for the testCreateWithLegacyMode() method.
public getCreateWithLegacyMode ( ) : array
Результат array

getImageHookCallback() публичный статический Метод

Returns a custom image path.
public static getImageHookCallback ( string $originalPath, integer $targetWidth, integer $targetHeight, string $resizeMode, string $cacheName, object $fileObj, string $targetPath, object $imageObj ) : string
$originalPath string The original path
$targetWidth integer The target width
$targetHeight integer The target height
$resizeMode string The resize mode
$cacheName string The cache name
$fileObj object The file object
$targetPath string The target path
$imageObj object The image object
Результат string The image path

tearDown() публичный Метод

public tearDown ( )

testCreate() публичный Метод

Tests the create() method.
public testCreate ( )

testCreateInvalidExtension() публичный Метод

Tests the create() method.

testCreateWithImageObjectAndEmptyResizeConfiguration() публичный Метод

Tests the create() method.

testCreateWithImageObjectAndResizeConfiguration() публичный Метод

Tests the create() method.

testCreateWithImageSize() публичный Метод

Tests the create() method.

testCreateWithLegacyMode() публичный Метод

Tests the create() method.
public testCreateWithLegacyMode ( string $mode, array $expected )
$mode string
$expected array

testCreateWithMissingImageSize() публичный Метод

Tests the create() method.

testCreateWithoutResize() публичный Метод

Tests the create() method.

testEmptyHooks() публичный Метод

Tests empty getImage and executeResize hooks.
public testEmptyHooks ( )

testExecuteResizeHook() публичный Метод

Tests the executeResize hook.

testGetImageHook() публичный Метод

Tests the getImage hook.
public testGetImageHook ( )

testGetImportantPartFromLegacyMode() публичный Метод

Tests the getImportantPartFromLegacyMode() method.
public testGetImportantPartFromLegacyMode ( string $mode, string $expected )
$mode string
$expected string

testGetImportantPartFromLegacyModeInvalidMode() публичный Метод

Tests the getImportantPartFromLegacyMode() method throws an exception for invalid resize modes.

testInstantiation() публичный Метод

Tests the object instantiation.
public testInstantiation ( )