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

Inheritance: extends lithium\test\Unit
Mostrar archivo Open project: unionofrad/lithium

Public Properties

Property Type Description
$request

Public Methods

Method Description
setUp ( )
tearDown ( )
testActionWithProcess ( )
testAttachAbsolute ( )
testAttachAbsoluteWithHttps ( )
testBasicRouteConnection ( )
testBasicRouteMatching ( ) Tests basic options for connecting routes.
testCompileScopeAbsolute ( )
testCompileScopeAbsoluteWithPrefix ( )
testCompileScopeAbsoluteWithVariables ( )
testConnectingWithDefaultParams ( )
testConnectingWithRequiredParams ( ) Tests generating routes with required parameters which are not present in the URL.
testCustomConfiguration ( ) Tests that the class dependency configuration can be modified.
testEmbeddedStringActions ( ) Tests that URLs specified as "Controller::action" and including additional parameters are interpreted properly.
testEmptyUrlMatching ( )
testHttpMethodBasedRouting ( ) Tests that routes can be connected and correctly match based on HTTP headers or method verbs.
testJavaScriptUrlGeneration ( )
testLibraryBasedRoute ( )
testListAttached ( )
testMatchOverRequestParamsWithScope ( )
testMatchWithAbsoluteAndNoSchemeAttachment ( )
testMatchWithAbsoluteAndPrefixedAttachment ( )
testMatchWithAbsoluteAndPrefixedAttachmentUsingBasedRequest ( )
testMatchWithAbsoluteAttachmentAndVariables ( )
testMatchWithAbsoluteAttachmentUsingDoubleColonNotation ( )
testMatchWithAbsoluteScope ( )
testMatchWithAttachementPopulatedFromRequest ( )
testMatchWithNoRouteDefined ( )
testMatchWithRelativeAndPrefixedAttachment ( )
testMatchWithRelativeAndPrefixedAttachmentUsingBasedRequest ( )
testMatchWithScopeAndWithoutController ( )
testMatchingEmptyRoute ( ) Tests that a successful match against a route with template '/' operating at the root of a domain never returns an empty string.
testNamedAnchor ( )
testOverridingPersistentParameters ( ) Tests that persistent parameters can be overridden with nulled-out values.
testParameterOrderIsRespected ( ) Tests that the order of the parameters is respected so it can trim the URL correctly.
testParameterPersistence ( ) Tests that a request context with persistent parameters generates URLs where those parameters are properly taken into account.
testParseScopeWithAbsoluteAndPrefixAttachment ( )
testParseScopeWithAbsoluteAndPrefixAttachmentUsingEnvRequest ( )
testParseScopeWithAbsoluteAndPrefixedAttachment ( )
testParseScopeWithAbsoluteAttachment ( )
testParseScopeWithAbsoluteAttachmentUsingVariables ( )
testParseScopeWithRelativeAndPrefixAttachmentUsingEnvRequest ( )
testParseScopeWithRelativeAndPrefixedAttachment ( )
testParseScopeWithRelativeAttachment ( )
testParseWithNotValidSchemeVariable ( )
testProcess ( )
testProcessWithAbsoluteAndPrefixedAttachment ( )
testProcessWithAbsoluteAttachment ( )
testProcessWithAbsoluteAttachmentAndLibrary ( )
testProcessWithAbsoluteAttachmentAndVariables ( )
testProcessWithAbsoluteHttpsAttachment ( )
testProcessWithRelativeAndPrefixedAttachment ( )
testQueryString ( )
testResettingRoutes ( ) Tests that routing is fully reset when calling Router::reset().
testReversingContinuations ( ) Tests that URLs are properly generated with route continuations.
testRouteContinuations ( ) Tests that continuation routes properly fall through and aggregate multiple route parameters.
testRouteContinuationsOnRootUrl ( )
testRouteContinuationsWithQueryString ( )
testRouteFormatters ( ) Tests default route formatters, and setting/getting new formatters.
testRouteFormattersAppliedOnMatch ( )
testRouteHandler ( ) Tests passing a closure handler to Router::connect() to bypass or augment default dispatching.
testRouteMatchAbsoluteUrl ( ) Tests matching routes and returning an absolute (protocol + hostname) URL.
testRouteMatchingWithDefaultParameters ( )
testRouteMatchingWithInsertsAndDefaults ( ) Test matching routes with insert parameters which have default values.
testRouteMatchingWithNoInserts ( ) Tests matching routes where the route template is a static string with no insert parameters.
testRouteMatchingWithOnlyInserts ( ) Test matching routes with only insert parameters and no default values.
testRouteModifiers ( )
testRouteRetrieval ( ) Tests getting routes using Router::get(), and checking to see if the routes returned match the routes connected.
testRouteRetrievalWithScope ( )
testScopeBase ( )
testShorthandParameterMatching ( )
testStackedContinuationRoutes ( ) Tests that multiple continuation routes can be applied to the same URL.
testStringActions ( ) Tests that URLs specified as "Controller::action" are interpreted properly.
testStringParameterConnect ( ) Tests that routes can be created with shorthand strings, i.e. 'Controller::action' and `array('Controller::action', 'id' => '.
testStringUrlGeneration ( )
testSuffixContinuation ( ) Tests that continuations can be used for route suffixes.
testTypeBasedRouting ( ) Tests routing based on content type extensions, with HTML being the default when types are not defined.
testUnexistingScopedRoute ( )
testWithWildcardArray ( )
testWithWildcardString ( )

Method Details

setUp() public method

public setUp ( )

tearDown() public method

public tearDown ( )

testActionWithProcess() public method

testAttachAbsolute() public method

public testAttachAbsolute ( )

testAttachAbsoluteWithHttps() public method

testBasicRouteConnection() public method

testBasicRouteMatching() public method

Tests basic options for connecting routes.

testCompileScopeAbsolute() public method

testCompileScopeAbsoluteWithPrefix() public method

testCompileScopeAbsoluteWithVariables() public method

testConnectingWithDefaultParams() public method

testConnectingWithRequiredParams() public method

Tests generating routes with required parameters which are not present in the URL.

testCustomConfiguration() public method

Tests that the class dependency configuration can be modified.

testEmbeddedStringActions() public method

Tests that URLs specified as "Controller::action" and including additional parameters are interpreted properly.

testEmptyUrlMatching() public method

testHttpMethodBasedRouting() public method

Tests that routes can be connected and correctly match based on HTTP headers or method verbs.

testJavaScriptUrlGeneration() public method

testLibraryBasedRoute() public method

testListAttached() public method

public testListAttached ( )

testMatchOverRequestParamsWithScope() public method

testMatchWithAbsoluteAndNoSchemeAttachment() public method

testMatchWithAbsoluteAndPrefixedAttachment() public method

testMatchWithAbsoluteAndPrefixedAttachmentUsingBasedRequest() public method

testMatchWithAbsoluteAttachmentAndVariables() public method

testMatchWithAbsoluteAttachmentUsingDoubleColonNotation() public method

testMatchWithAbsoluteScope() public method

testMatchWithAttachementPopulatedFromRequest() public method

testMatchWithNoRouteDefined() public method

testMatchWithRelativeAndPrefixedAttachment() public method

testMatchWithRelativeAndPrefixedAttachmentUsingBasedRequest() public method

testMatchWithScopeAndWithoutController() public method

testMatchingEmptyRoute() public method

Tests that a successful match against a route with template '/' operating at the root of a domain never returns an empty string.

testNamedAnchor() public method

public testNamedAnchor ( )

testOverridingPersistentParameters() public method

Tests that persistent parameters can be overridden with nulled-out values.

testParameterOrderIsRespected() public method

Tests that the order of the parameters is respected so it can trim the URL correctly.

testParameterPersistence() public method

Tests that a request context with persistent parameters generates URLs where those parameters are properly taken into account.

testParseScopeWithAbsoluteAndPrefixAttachment() public method

testParseScopeWithAbsoluteAndPrefixAttachmentUsingEnvRequest() public method

testParseScopeWithAbsoluteAndPrefixedAttachment() public method

testParseScopeWithAbsoluteAttachment() public method

testParseScopeWithAbsoluteAttachmentUsingVariables() public method

testParseScopeWithRelativeAndPrefixAttachmentUsingEnvRequest() public method

testParseScopeWithRelativeAndPrefixedAttachment() public method

testParseScopeWithRelativeAttachment() public method

testParseWithNotValidSchemeVariable() public method

testProcess() public method

public testProcess ( )

testProcessWithAbsoluteAndPrefixedAttachment() public method

testProcessWithAbsoluteAttachment() public method

testProcessWithAbsoluteAttachmentAndLibrary() public method

testProcessWithAbsoluteAttachmentAndVariables() public method

testProcessWithAbsoluteHttpsAttachment() public method

testProcessWithRelativeAndPrefixedAttachment() public method

testQueryString() public method

public testQueryString ( )

testResettingRoutes() public method

Tests that routing is fully reset when calling Router::reset().
public testResettingRoutes ( )

testReversingContinuations() public method

Tests that URLs are properly generated with route continuations.

testRouteContinuations() public method

Tests that continuation routes properly fall through and aggregate multiple route parameters.

testRouteContinuationsOnRootUrl() public method

testRouteContinuationsWithQueryString() public method

testRouteFormatters() public method

Tests default route formatters, and setting/getting new formatters.
public testRouteFormatters ( )

testRouteFormattersAppliedOnMatch() public method

testRouteHandler() public method

Tests passing a closure handler to Router::connect() to bypass or augment default dispatching.
public testRouteHandler ( )

testRouteMatchAbsoluteUrl() public method

Tests matching routes and returning an absolute (protocol + hostname) URL.

testRouteMatchingWithDefaultParameters() public method

testRouteMatchingWithInsertsAndDefaults() public method

Test matching routes with insert parameters which have default values.

testRouteMatchingWithNoInserts() public method

Tests matching routes where the route template is a static string with no insert parameters.

testRouteMatchingWithOnlyInserts() public method

Test matching routes with only insert parameters and no default values.

testRouteModifiers() public method

public testRouteModifiers ( )

testRouteRetrieval() public method

Tests getting routes using Router::get(), and checking to see if the routes returned match the routes connected.
public testRouteRetrieval ( )

testRouteRetrievalWithScope() public method

testScopeBase() public method

public testScopeBase ( )

testShorthandParameterMatching() public method

testStackedContinuationRoutes() public method

Tests that multiple continuation routes can be applied to the same URL.

testStringActions() public method

Tests that URLs specified as "Controller::action" are interpreted properly.
public testStringActions ( )

testStringParameterConnect() public method

..')`.

testStringUrlGeneration() public method

testSuffixContinuation() public method

Tests that continuations can be used for route suffixes.

testTypeBasedRouting() public method

Tests routing based on content type extensions, with HTML being the default when types are not defined.

testUnexistingScopedRoute() public method

testWithWildcardArray() public method

testWithWildcardString() public method

Property Details

$request public_oe property

public $request