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

Inheritance: extends lithium\test\Unit
Datei anzeigen Open project: unionofrad/lithium

Public Methods

Method 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 method

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

testAssetAbsoluteRelativePaths() public method

testAssetPathGeneration() public method

testAssetPathGenerationWithLocation() public method

testAssetTypeHandling() public method

testAssetWithAbsoluteLocation() public method

testContentNegotiationByType() public method

testContentNegotiationByUserAgent() public method

testContentNegotiationSimple() public method

testContentTypeDetection() public method

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

testCustomAssetPathGeneration() public method

testCustomAssetUrls() public method

public testCustomAssetUrls ( )

testCustomEncodeHandler() public method

testCustomWebroot() public method

public testCustomWebroot ( )

testDecode() public method

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

testDeleteLocation() public method

public testDeleteLocation ( )

testDuplicateBasePathCheck() public method

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

testEmptyAssetPaths() public method

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 method

public testEmptyEncode ( )

testEmptyHostAndSchemeOptionLocation() public method

testEncodeNotCallable() public method

testEncodeRecordSet() public method

public testEncodeRecordSet ( )

testEnvironmentAsset1() public method

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 method

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 method

testListAttached() public method

public testListAttached ( )

testLocation() public method

public testLocation ( )

testManualAssetPaths() public method

testManualContentHandling() public method

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

testMediaEncoding() public method

public testMediaEncoding ( )

testMediaTypes() public method

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

testMultiLibraryAssetPaths() public method

testMultipleHostsAndSchemeSelectSameIndex() public method

testMultipleHostsAndSingleSchemePicksOnlyScheme() public method

testMultipleHostsPickSameHostForIdenticalAsset() public method

testNoDecode() public method

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

testPlainTextOutput() public method

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

testQueryUndefinedAssetTypes() public method

testRender() public method

public testRender ( )

testRenderWithOptionsMerging() public method

testRequestOptionMerging() public method

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 method

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

testScopeBase() public method

public testScopeBase ( )

testStateReset() public method

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

testTypeAliasResolution() public method

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 method

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 method

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.