PHP Class ImboUnitTest\Http\Response\ResponseFormatterTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: imbo/imbo

Méthodes publiques

Méthode Description
getImageResources ( )
getJsonpTriggers ( ) : array[] Get different jsonp triggers
getOriginalMimeTypes ( ) : array[] Get mime types and the expected formatter
setUp ( ) Set up the response formatter
tearDown ( ) Tear down the response
testCanSetAndGetTheFormatter ( )
testCanWrapJsonDataInSpecifiedCallback ( $param, $callback, $contentType, $valid = true )
testDoesNotDoContentNegotiationWhenTheRequestedPathIncludesAnExtension ( )
testDoesNotForceContentNegotiationOnErrorModelsWhenResourceIsNotAnImage ( )
testDoesNotSetResponseContentWhenHttpMethodIsHead ( )
testDoesNotTriggerAnImageConversionWhenTheImageHasTheCorrectMimeType ( )
testForcesContentNegotiationOnErrorModelsWhenResourceIsAnImage ( $routeName )
testPicksThePrioritizedMediaTypeIfMoreThanOneWithSameQualityAreSupportedByTheUserAgent ( )
testReturnWhenStatusCodeIs204 ( )
testReturnWhenThereIsNoModel ( )
testReturnsACorrectEventSubscription ( )
testThrowsAnExceptionInStrictModeWhenTheUserAgentDoesNotSupportAnyOfImbosMediaTypes ( )
testTriggersAConversionTransformationIfNeededWhenTheModelIsAnImage ( )
testUsesDefaultMediaTypeInNonStrictModeWhenTheUserAgentDoesNotSupportAnyMediaTypes ( )
testUsesTheOriginalMimeTypeOfTheImageIfConfigDisablesContentNegotiationForImages ( $originalMimeType, $expectedFormatter )
testUsesTheOriginalMimeTypeOfTheImageIfTheClientHasNoPreference ( $originalMimeType, $expectedFormatter )

Method Details

getImageResources() public méthode

public getImageResources ( )

getJsonpTriggers() public méthode

Get different jsonp triggers
public getJsonpTriggers ( ) : array[]
Résultat array[]

getOriginalMimeTypes() public méthode

Get mime types and the expected formatter
public getOriginalMimeTypes ( ) : array[]
Résultat array[]

setUp() public méthode

Set up the response formatter
public setUp ( )

tearDown() public méthode

Tear down the response
public tearDown ( )

testCanSetAndGetTheFormatter() public méthode

testCanWrapJsonDataInSpecifiedCallback() public méthode

public testCanWrapJsonDataInSpecifiedCallback ( $param, $callback, $contentType, $valid = true )

testDoesNotDoContentNegotiationWhenTheRequestedPathIncludesAnExtension() public méthode

testDoesNotForceContentNegotiationOnErrorModelsWhenResourceIsNotAnImage() public méthode

testDoesNotSetResponseContentWhenHttpMethodIsHead() public méthode

testDoesNotTriggerAnImageConversionWhenTheImageHasTheCorrectMimeType() public méthode

testForcesContentNegotiationOnErrorModelsWhenResourceIsAnImage() public méthode

testPicksThePrioritizedMediaTypeIfMoreThanOneWithSameQualityAreSupportedByTheUserAgent() public méthode

testReturnWhenStatusCodeIs204() public méthode

testReturnWhenThereIsNoModel() public méthode

testReturnsACorrectEventSubscription() public méthode

testThrowsAnExceptionInStrictModeWhenTheUserAgentDoesNotSupportAnyOfImbosMediaTypes() public méthode

testTriggersAConversionTransformationIfNeededWhenTheModelIsAnImage() public méthode

testUsesDefaultMediaTypeInNonStrictModeWhenTheUserAgentDoesNotSupportAnyMediaTypes() public méthode

testUsesTheOriginalMimeTypeOfTheImageIfConfigDisablesContentNegotiationForImages() public méthode

testUsesTheOriginalMimeTypeOfTheImageIfTheClientHasNoPreference() public méthode

public testUsesTheOriginalMimeTypeOfTheImageIfTheClientHasNoPreference ( $originalMimeType, $expectedFormatter )