PHP Класс lithium\tests\cases\net\http\MediaTest

Наследование: extends lithium\test\Unit
Показать файл Открыть проект

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

Метод Описание
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.