PHP 클래스 lithium\tests\cases\net\http\MediaTest

상속: extends lithium\test\Unit
파일 보기 프로젝트 열기: unionofrad/lithium

공개 메소드들

메소드 설명
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.

메소드 상세

tearDown() 공개 메소드

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

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() 공개 메소드

public testCustomAssetUrls ( )

testCustomEncodeHandler() 공개 메소드

testCustomWebroot() 공개 메소드

public testCustomWebroot ( )

testDecode() 공개 메소드

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

testDeleteLocation() 공개 메소드

public 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.
public testEmptyAssetPaths ( )

testEmptyEncode() 공개 메소드

public testEmptyEncode ( )

testEmptyHostAndSchemeOptionLocation() 공개 메소드

testEncodeNotCallable() 공개 메소드

testEncodeRecordSet() 공개 메소드

public 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() 공개 메소드

public testListAttached ( )

testLocation() 공개 메소드

public 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() 공개 메소드

public testMediaEncoding ( )

testMediaTypes() 공개 메소드

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

testMultiLibraryAssetPaths() 공개 메소드

testMultipleHostsAndSchemeSelectSameIndex() 공개 메소드

testMultipleHostsAndSingleSchemePicksOnlyScheme() 공개 메소드

testMultipleHostsPickSameHostForIdenticalAsset() 공개 메소드

testNoDecode() 공개 메소드

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

testPlainTextOutput() 공개 메소드

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

testQueryUndefinedAssetTypes() 공개 메소드

testRender() 공개 메소드

public 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() 공개 메소드

public testScopeBase ( )

testStateReset() 공개 메소드

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

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.