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

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

Méthodes publiques

Méthode Description
testBaseRouteMatching ( ) Tests the creation of routes for the base URL (i.e. '/'), and that they are matched properly given the correct parameters.
testBaseRouteParsing ( ) Tests that a request for the base URL (i.e. '/') returns the proper parameters, as defined by the base route.
testContinuationRoute ( )
testContinuationRouteWithParameters ( )
testContinuationRouteWithQueryString ( ) Tests that continuation routes don't append query strings.
testCustomSubPattern ( ) Tests creating a route with a custom regex sub-pattern in a template.
testCustomSubPatternWithTrailing ( ) Tests creating a route with a custom sub-pattern and trailing route
testDefaultsAreKept ( ) Tests that routes with defaults keep their defaults, even when there are keys in the route template.
testHandlerModification ( ) Tests that route handlers are able to modify route parameters.
testHeaderAndMethodBasedRouting ( ) Tests that requests can be routed based on HTTP method verbs or HTTP headers.
testManualRouteDefinition ( ) Tests that routes can be composed of manual regular expressions.
testMatchWithNoRequestMethod ( ) Test route matching for routes with no request method (http:method)
testMatchWithRequestMethod ( ) Test route matching for routes with specified request method (http:method)
testMatchWithRequestMethodGet ( ) Test route matching for routes with request method (http:method) GET
testMatchWithRequestMethodWithParam ( ) Test route matching for routes with specified request method (http:method) and a param
testMatchingEmptyRoute ( ) Tests that a successful match against a route with template '/' operating at the root of a domain never returns an empty string.
testPatternsWithRepetition ( ) Tests that route templates with elements containing repetition patterns are correctly parsed.
testReversingRegexRoutes ( )
testRouteExporting ( ) Tests exporting a the details of a compiled route to an array.
testRouteMatchParseSymmetryWithRootTrimming ( )
testRouteMatchParseSymmetryWithoutTrimming ( )
testRouteMatchingWithEmptyTrailingParams ( )
testRouteMatchingWithOptionalParam ( )
testRouteParsingWithOptionalParam ( )
testRouteParsingWithOptionalParams ( )
testRouteParsingWithOptionalParamsAndType ( )
testRouteParsingWithParamsEqualsToZero ( )
testRouteParsingWithRegexAction ( )
testRouteParsingWithRegexActionAndParamWithAction ( )
testRouteParsingWithRegexActionAndParamWithoutAction ( )
testRoutesWithQueryStrings ( ) Tests that routes with querystrings are correctly processed.
testRoutingMultipleMatch ( ) Tests creating a route with a custom pattern that accepts URLs in two formats but only generates them in one.
testSimpleRouteMatching ( ) Tests that simple routes with only a {:controller} parameter are properly matched, and anything including extra parameters or an action other than the default action are ignored.
testSimpleRouteParsing ( ) Tests that requests for base-level resource URLs (i.e. '/posts') are properly parsed into the correct controller and action parameters.
testSingleRouteWithDefaultValues ( ) Tests that a single route with default values matches its default parameters, as well as non-default parameters.
testStaticRouteMatching ( )
testTrimmingEmptyPathElements ( ) Tests that routes with optional trailing elements have unnecessary slashes trimmed.
testTwoParameterRoutes ( ) Tests fix for route parameter matching.
testUnicodeParameters ( ) Tests that routes with Unicode characters are correctly parsed.
testUrlEncodedArgs ( )
testValidPatternGeneration ( ) Tests correct regex backtracking.

Method Details

testBaseRouteMatching() public méthode

Tests the creation of routes for the base URL (i.e. '/'), and that they are matched properly given the correct parameters.

testBaseRouteParsing() public méthode

Tests that a request for the base URL (i.e. '/') returns the proper parameters, as defined by the base route.

testContinuationRoute() public méthode

testContinuationRouteWithParameters() public méthode

testContinuationRouteWithQueryString() public méthode

Tests that continuation routes don't append query strings.

testCustomSubPattern() public méthode

Tests creating a route with a custom regex sub-pattern in a template.

testCustomSubPatternWithTrailing() public méthode

Tests creating a route with a custom sub-pattern and trailing route

testDefaultsAreKept() public méthode

Tests that routes with defaults keep their defaults, even when there are keys in the route template.
public testDefaultsAreKept ( )

testHandlerModification() public méthode

Tests that route handlers are able to modify route parameters.

testHeaderAndMethodBasedRouting() public méthode

Tests that requests can be routed based on HTTP method verbs or HTTP headers.

testManualRouteDefinition() public méthode

Tests that routes can be composed of manual regular expressions.

testMatchWithNoRequestMethod() public méthode

Test route matching for routes with no request method (http:method)

testMatchWithRequestMethod() public méthode

Test route matching for routes with specified request method (http:method)

testMatchWithRequestMethodGet() public méthode

Test route matching for routes with request method (http:method) GET

testMatchWithRequestMethodWithParam() public méthode

Test route matching for routes with specified request method (http:method) and a param

testMatchingEmptyRoute() public méthode

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

testPatternsWithRepetition() public méthode

Tests that route templates with elements containing repetition patterns are correctly parsed.

testReversingRegexRoutes() public méthode

testRouteExporting() public méthode

Tests exporting a the details of a compiled route to an array.
public testRouteExporting ( )

testRouteMatchParseSymmetryWithRootTrimming() public méthode

testRouteMatchParseSymmetryWithoutTrimming() public méthode

testRouteMatchingWithEmptyTrailingParams() public méthode

testRouteMatchingWithOptionalParam() public méthode

testRouteParsingWithOptionalParam() public méthode

testRouteParsingWithOptionalParams() public méthode

testRouteParsingWithOptionalParamsAndType() public méthode

testRouteParsingWithParamsEqualsToZero() public méthode

testRouteParsingWithRegexAction() public méthode

testRouteParsingWithRegexActionAndParamWithAction() public méthode

testRouteParsingWithRegexActionAndParamWithoutAction() public méthode

testRoutesWithQueryStrings() public méthode

Tests that routes with querystrings are correctly processed.

testRoutingMultipleMatch() public méthode

Tests creating a route with a custom pattern that accepts URLs in two formats but only generates them in one.

testSimpleRouteMatching() public méthode

Tests that simple routes with only a {:controller} parameter are properly matched, and anything including extra parameters or an action other than the default action are ignored.

testSimpleRouteParsing() public méthode

Tests that requests for base-level resource URLs (i.e. '/posts') are properly parsed into the correct controller and action parameters.

testSingleRouteWithDefaultValues() public méthode

Tests that a single route with default values matches its default parameters, as well as non-default parameters.

testStaticRouteMatching() public méthode

testTrimmingEmptyPathElements() public méthode

Tests that routes with optional trailing elements have unnecessary slashes trimmed.

testTwoParameterRoutes() public méthode

Tests fix for route parameter matching.

testUnicodeParameters() public méthode

Tests that routes with Unicode characters are correctly parsed.

testUrlEncodedArgs() public méthode

public testUrlEncodedArgs ( )

testValidPatternGeneration() public méthode

Tests correct regex backtracking.