PHP Class lithium\tests\cases\net\http\MediaTest

Inheritance: extends lithium\test\Unit
Afficher le fichier Open project: unionofrad/lithium

Méthodes publiques

Méthode Description
tearDown ( ) Reset the Media class to its default state.
testAssetAbsoluteRelativePaths ( )
testAssetPathGeneration ( )
testAssetPathGenerationWithLocation ( )
testAssetTypeHandling ( )
testAssetWithAbsoluteLocation ( )
testContentNegotiationByType ( )
testContentNegotiationByUserAgent ( )
testContentNegotiationSimple ( )
testContentTypeDetection ( ) Tests that Media will return the correct type name of recognized, registered content types.
testCustomAssetPathGeneration ( )
testCustomAssetUrls ( )
testCustomEncodeHandler ( )
testCustomWebroot ( )
testDecode ( ) Tests that types with decode handlers can properly decode content.
testDeleteLocation ( )
testDuplicateBasePathCheck ( ) Tests that Media::asset() will not prepend path strings with the base application path if it has already been prepended.
testEmptyAssetPaths ( ) Tests that empty asset paths correctly return the base path for the asset type, and don't generate notices or errors.
testEmptyEncode ( )
testEmptyHostAndSchemeOptionLocation ( )
testEncodeNotCallable ( )
testEncodeRecordSet ( )
testEnvironmentAsset1 ( ) Create environment prefix location using lihtium\net\http\Media::location Check if lihtium\net\http\Media::asset return the correct URL for the production environement
testEnvironmentAsset2 ( ) Create environment prefix location using lihtium\net\http\Media::location Check if lihtium\net\http\Media::asset return the correct URL for the test environement
testGetLibraryWebroot ( )
testListAttached ( )
testLocation ( )
testManualAssetPaths ( )
testManualContentHandling ( ) Tests handling content type manually using parameters to Media::render(), for content types that are registered but have no default handler.
testMediaEncoding ( )
testMediaTypes ( ) Tests setting, getting and removing custom media types.
testMultiLibraryAssetPaths ( )
testMultipleHostsAndSchemeSelectSameIndex ( )
testMultipleHostsAndSingleSchemePicksOnlyScheme ( )
testMultipleHostsPickSameHostForIdenticalAsset ( )
testNoDecode ( ) Tests that a decode handler is not called when the Media type has none configured.
testPlainTextOutput ( ) Tests that rendering plain text correctly returns the render data as-is.
testQueryUndefinedAssetTypes ( )
testRender ( )
testRenderWithOptionsMerging ( )
testRequestOptionMerging ( ) Tests that parameters from the Request object passed into render() via $options['request'] are properly merged into the $options array passed to render handlers.
testResponseModification ( ) Tests that the Response object can be directly modified from a templating class or encode function.
testScopeBase ( )
testStateReset ( ) Tests that the Media class' configuration can be reset to its default state.
testTypeAliasResolution ( ) Tests that calling Media::type() to retrieve the details of a type that is aliased to another type, automatically resolves to the settings of the type being pointed at.
testUndhandledContent ( ) Tests that an exception is thrown for cases where an attempt is made to render content for a type which is not registered.
testUnregisteredContentHandler ( ) Tests that attempts to render a media type with no handler registered produces an 'unhandled media type' exception, even if the type itself is a registered content type.

Method Details

tearDown() public méthode

Reset the Media class to its default state.
public tearDown ( )

testAssetAbsoluteRelativePaths() public méthode

testAssetPathGeneration() public méthode

testAssetPathGenerationWithLocation() public méthode

testAssetTypeHandling() public méthode

testAssetWithAbsoluteLocation() public méthode

testContentNegotiationByType() public méthode

testContentNegotiationByUserAgent() public méthode

testContentNegotiationSimple() public méthode

testContentTypeDetection() public méthode

Tests that Media will return the correct type name of recognized, registered content types.

testCustomAssetPathGeneration() public méthode

testCustomAssetUrls() public méthode

public testCustomAssetUrls ( )

testCustomEncodeHandler() public méthode

testCustomWebroot() public méthode

public testCustomWebroot ( )

testDecode() public méthode

Tests that types with decode handlers can properly decode content.
public testDecode ( )

testDeleteLocation() public méthode

public testDeleteLocation ( )

testDuplicateBasePathCheck() public méthode

Tests that Media::asset() will not prepend path strings with the base application path if it has already been prepended.

testEmptyAssetPaths() public méthode

Tests that empty asset paths correctly return the base path for the asset type, and don't generate notices or errors.
public testEmptyAssetPaths ( )

testEmptyEncode() public méthode

public testEmptyEncode ( )

testEmptyHostAndSchemeOptionLocation() public méthode

testEncodeNotCallable() public méthode

testEncodeRecordSet() public méthode

public testEncodeRecordSet ( )

testEnvironmentAsset1() public méthode

Create environment prefix location using lihtium\net\http\Media::location Check if lihtium\net\http\Media::asset return the correct URL for the production environement

testEnvironmentAsset2() public méthode

Create environment prefix location using lihtium\net\http\Media::location Check if lihtium\net\http\Media::asset return the correct URL for the test environement

testGetLibraryWebroot() public méthode

testListAttached() public méthode

public testListAttached ( )

testLocation() public méthode

public testLocation ( )

testManualAssetPaths() public méthode

testManualContentHandling() public méthode

Tests handling content type manually using parameters to Media::render(), for content types that are registered but have no default handler.

testMediaEncoding() public méthode

public testMediaEncoding ( )

testMediaTypes() public méthode

Tests setting, getting and removing custom media types.
public testMediaTypes ( )

testMultiLibraryAssetPaths() public méthode

testMultipleHostsAndSchemeSelectSameIndex() public méthode

testMultipleHostsAndSingleSchemePicksOnlyScheme() public méthode

testMultipleHostsPickSameHostForIdenticalAsset() public méthode

testNoDecode() public méthode

Tests that a decode handler is not called when the Media type has none configured.
public testNoDecode ( )

testPlainTextOutput() public méthode

Tests that rendering plain text correctly returns the render data as-is.
public testPlainTextOutput ( )

testQueryUndefinedAssetTypes() public méthode

testRender() public méthode

public testRender ( )

testRenderWithOptionsMerging() public méthode

testRequestOptionMerging() public méthode

Tests that parameters from the Request object passed into render() via $options['request'] are properly merged into the $options array passed to render handlers.

testResponseModification() public méthode

Tests that the Response object can be directly modified from a templating class or encode function.

testScopeBase() public méthode

public testScopeBase ( )

testStateReset() public méthode

Tests that the Media class' configuration can be reset to its default state.
public testStateReset ( )

testTypeAliasResolution() public méthode

Tests that calling Media::type() to retrieve the details of a type that is aliased to another type, automatically resolves to the settings of the type being pointed at.

testUndhandledContent() public méthode

Tests that an exception is thrown for cases where an attempt is made to render content for a type which is not registered.

testUnregisteredContentHandler() public méthode

Tests that attempts to render a media type with no handler registered produces an 'unhandled media type' exception, even if the type itself is a registered content type.