PHP Класс Contao\CoreBundle\Test\Contao\ImageTest

Наследование: extends Contao\CoreBundle\Test\TestCase
Показать файл Открыть проект

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

Метод Описание
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.
public getComputeResizeDataWithImportantPart ( ) : array
Результат array

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

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

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.