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

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

Public Methods

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

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

testBaseRouteParsing() public method

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

testContinuationRoute() public method

testContinuationRouteWithParameters() public method

testContinuationRouteWithQueryString() public method

Tests that continuation routes don't append query strings.

testCustomSubPattern() public method

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

testCustomSubPatternWithTrailing() public method

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

testDefaultsAreKept() public method

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

testHandlerModification() public method

Tests that route handlers are able to modify route parameters.

testHeaderAndMethodBasedRouting() public method

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

testManualRouteDefinition() public method

Tests that routes can be composed of manual regular expressions.

testMatchWithNoRequestMethod() public method

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

testMatchWithRequestMethod() public method

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

testMatchWithRequestMethodGet() public method

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

testMatchWithRequestMethodWithParam() public method

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

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.

testPatternsWithRepetition() public method

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

testReversingRegexRoutes() public method

testRouteExporting() public method

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

testRouteMatchParseSymmetryWithRootTrimming() public method

testRouteMatchParseSymmetryWithoutTrimming() public method

testRouteMatchingWithEmptyTrailingParams() public method

testRouteMatchingWithOptionalParam() public method

testRouteParsingWithOptionalParam() public method

testRouteParsingWithOptionalParams() public method

testRouteParsingWithOptionalParamsAndType() public method

testRouteParsingWithParamsEqualsToZero() public method

testRouteParsingWithRegexAction() public method

testRouteParsingWithRegexActionAndParamWithAction() public method

testRouteParsingWithRegexActionAndParamWithoutAction() public method

testRoutesWithQueryStrings() public method

Tests that routes with querystrings are correctly processed.

testRoutingMultipleMatch() public method

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

testSimpleRouteMatching() public method

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 method

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

testSingleRouteWithDefaultValues() public method

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

testStaticRouteMatching() public method

testTrimmingEmptyPathElements() public method

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

testTwoParameterRoutes() public method

Tests fix for route parameter matching.

testUnicodeParameters() public method

Tests that routes with Unicode characters are correctly parsed.

testUrlEncodedArgs() public method

public testUrlEncodedArgs ( )

testValidPatternGeneration() public method

Tests correct regex backtracking.