PHP 클래스 Contao\CoreBundle\Test\Image\ImageFactoryTest

저자: Martin Auswöger ([email protected])
파일 보기 프로젝트 열기: contao/core-bundle

공개 메소드들

메소드 설명
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 ( )