PHP 클래스 Contao\CoreBundle\Test\Contao\ImageTest

파일 보기 프로젝트 열기: contao/core-bundle

공개 메소드들

메소드 설명
executeResizeHookCallback ( object $imageObj ) : string Returns a custom image path.
getCacheName ( ) : array Provides the data for the testGetCacheName() method.
getComputeResizeDataWithImportantPart ( ) : array Provides the data for the testComputeResizeWithImportantPart() method.
getComputeResizeDataWithoutImportantPart ( ) : array Provides the data for the testComputeResizeWithoutImportantPart() method.
getGetPixelValueData ( ) : array Provides the data for the testGetPixelValue() method.
getImageHookCallback ( string $originalPath, integer $targetWidth, integer $targetHeight, string $resizeMode, string $cacheName, object $fileObj, string $targetPath, object $imageObj ) : string Returns a custom image path.
getLegacyGet ( ) : array Provides the data for the testLegacyGet() method.
getLegacyResize ( ) : array Provides the data for the testLegacyGet() method.
setUpBeforeClass ( )
tearDownAfterClass ( )
testComputeResizeWithImportantPart ( array $arguments, array $expectedResult ) Tests resizing with an important part.
testComputeResizeWithoutImportantPart ( array $arguments, array $expectedResult ) Tests resizing without an important part.
testConstruct ( ) Tests the object instantiation.
testConstructWithInvalidExtension ( ) Tests the object instantiation with an invalid extension.
testConstructWithNonexistentFile ( ) Tests the object instantiation with a non-existent file.
testExecuteResizeHook ( ) Tests the executeResize hook.
testExecuteResizeNoResizeNeeded ( ) Tests resizing an image which already matches the given dimensions.
testExecuteResizeStandardCropResize ( ) Tests resizing an image which has to be cropped.
testExecuteResizeStandardCropResizeAndFileExistsAlready ( ) Tests resizing an image which has to be cropped and has an existing target defined.
testExecuteResizeStandardCropResizeAndTarget ( ) Tests resizing an image which has to be cropped and has a target defined.
testExecuteResizeSvg ( ) Tests resizing an SVG image.
testExecuteResizeSvgPercentageDimensions ( ) Tests resizing an SVG image with percentage based dimensions.
testExecuteResizeSvgWithoutDimensions ( ) Tests resizing an SVG image without dimensions.
testExecuteResizeSvgWithoutViewBox ( ) Tests resizing an SVG image without a view box.
testExecuteResizeSvgWithoutViewBoxAndDimensions ( ) Tests resizing an SVG image without a view box and dimensions.
testExecuteResizeSvgz ( ) Tests resizing an SVGZ image.
testGetCacheName ( array $arguments, string $expectedCacheName ) Tests the getCacheName() method.
testGetDeprecatedInvalidImages ( ) Tests the deprecated methods of the Image class.
testGetImageHook ( ) Tests the getImage hook.
testGetPixelValue ( string $value, integer $expected ) Tests the getPixelValue() method.
testLegacyGet ( array $arguments, array $expectedResult ) Tests the legacy get() method.
testLegacyResize ( array $arguments, array $expectedResult ) Tests the legacy resize() method.
testSetZoomOutOfBoundsNegative ( ) Tests the setZoomLevel() with a negative out of bounds value.
testSetZoomOutOfBoundsPositive ( ) Tests the setZoomLevel() method with a positive out of bounds value.
testSettersAndGetters ( ) Tests the setters and getters.

보호된 메소드들

메소드 설명
setUp ( )

메소드 상세

executeResizeHookCallback() 공개 정적인 메소드

Returns a custom image path.
public static executeResizeHookCallback ( object $imageObj ) : string
$imageObj object The image object
리턴 string The image path

getCacheName() 공개 메소드

Provides the data for the testGetCacheName() method.
public getCacheName ( ) : array
리턴 array

getComputeResizeDataWithImportantPart() 공개 메소드

Provides the data for the testComputeResizeWithImportantPart() method.

getComputeResizeDataWithoutImportantPart() 공개 메소드

Provides the data for the testComputeResizeWithoutImportantPart() method.

getGetPixelValueData() 공개 메소드

Provides the data for the testGetPixelValue() method.
public getGetPixelValueData ( ) : 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
$targetWidth integer
$targetHeight integer
$resizeMode string
$cacheName string
$fileObj object
$targetPath string
$imageObj object
리턴 string

getLegacyGet() 공개 메소드

Provides the data for the testLegacyGet() method.
public getLegacyGet ( ) : array
리턴 array

getLegacyResize() 공개 메소드

Provides the data for the testLegacyGet() method.
public getLegacyResize ( ) : array
리턴 array

setUp() 보호된 메소드

protected setUp ( )

setUpBeforeClass() 공개 정적인 메소드

public static setUpBeforeClass ( )

tearDownAfterClass() 공개 정적인 메소드

public static tearDownAfterClass ( )

testComputeResizeWithImportantPart() 공개 메소드

Tests resizing with an important part.
public testComputeResizeWithImportantPart ( array $arguments, array $expectedResult )
$arguments array
$expectedResult array

testComputeResizeWithoutImportantPart() 공개 메소드

Tests resizing without an important part.
public testComputeResizeWithoutImportantPart ( array $arguments, array $expectedResult )
$arguments array
$expectedResult array

testConstruct() 공개 메소드

Tests the object instantiation.
public testConstruct ( )

testConstructWithInvalidExtension() 공개 메소드

Tests the object instantiation with an invalid extension.

testConstructWithNonexistentFile() 공개 메소드

Tests the object instantiation with a non-existent file.

testExecuteResizeHook() 공개 메소드

Tests the executeResize hook.

testExecuteResizeNoResizeNeeded() 공개 메소드

Tests resizing an image which already matches the given dimensions.

testExecuteResizeStandardCropResize() 공개 메소드

Tests resizing an image which has to be cropped.

testExecuteResizeStandardCropResizeAndFileExistsAlready() 공개 메소드

Tests resizing an image which has to be cropped and has an existing target defined.

testExecuteResizeStandardCropResizeAndTarget() 공개 메소드

Tests resizing an image which has to be cropped and has a target defined.

testExecuteResizeSvg() 공개 메소드

Tests resizing an SVG image.

testExecuteResizeSvgPercentageDimensions() 공개 메소드

Tests resizing an SVG image with percentage based dimensions.

testExecuteResizeSvgWithoutDimensions() 공개 메소드

Tests resizing an SVG image without dimensions.

testExecuteResizeSvgWithoutViewBox() 공개 메소드

Tests resizing an SVG image without a view box.

testExecuteResizeSvgWithoutViewBoxAndDimensions() 공개 메소드

Tests resizing an SVG image without a view box and dimensions.

testExecuteResizeSvgz() 공개 메소드

Tests resizing an SVGZ image.

testGetCacheName() 공개 메소드

Tests the getCacheName() method.
public testGetCacheName ( array $arguments, string $expectedCacheName )
$arguments array
$expectedCacheName string

testGetDeprecatedInvalidImages() 공개 메소드

Tests the deprecated methods of the Image class.

testGetImageHook() 공개 메소드

Tests the getImage hook.
public testGetImageHook ( )

testGetPixelValue() 공개 메소드

Tests the getPixelValue() method.
public testGetPixelValue ( string $value, integer $expected )
$value string
$expected integer

testLegacyGet() 공개 메소드

Tests the legacy get() method.
public testLegacyGet ( array $arguments, array $expectedResult )
$arguments array
$expectedResult array

testLegacyResize() 공개 메소드

Tests the legacy resize() method.
public testLegacyResize ( array $arguments, array $expectedResult )
$arguments array
$expectedResult array

testSetZoomOutOfBoundsNegative() 공개 메소드

Tests the setZoomLevel() with a negative out of bounds value.

testSetZoomOutOfBoundsPositive() 공개 메소드

Tests the setZoomLevel() method with a positive out of bounds value.

testSettersAndGetters() 공개 메소드

Tests the setters and getters.