PHP Class RouterTest

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: mikecao/flight Class Usage Examples

Public Methods

Method Description
check ( $str = '' ) Checks if a route was matched with a given output
ok ( ) Simple output
routeRequest ( )
setUp ( )
testCaseSensitivity ( ) Test case sensitivity
testDefaultRoute ( ) Default route
testGetPostRoute ( ) Either GET or POST route
testNotFound ( ) Test not found
testOptionalParameters ( ) Optional parameters
testPathRoute ( ) Simple path
testPostRoute ( ) POST route
testRegEx ( ) Test regular expression matching
testRegExParameters ( ) Passing URL parameters matched with regular expression
testRegexEmptyOptionalParameters ( ) Regex in optional parameters
testRegexOptionalParameters ( ) Regex in optional parameters
testRouteObjectPassing ( ) Check if route object was passed
testRouteWithParameters ( )
testSplatNamedPlusWildcard ( ) Test splat with named parameters
testSplatWildcard ( ) Test splat
testSplatWildcardTrailingSlash ( ) Test splat without trailing slash
testUrlParameters ( ) Passing URL parameters
testWildcard ( ) Wildcard matching

Method Details

check() public method

Checks if a route was matched with a given output
public check ( $str = '' )

ok() public method

Simple output
public ok ( )

routeRequest() public method

public routeRequest ( )

setUp() public method

public setUp ( )

testCaseSensitivity() public method

Test case sensitivity
public testCaseSensitivity ( )

testDefaultRoute() public method

Default route
public testDefaultRoute ( )

testGetPostRoute() public method

Either GET or POST route
public testGetPostRoute ( )

testNotFound() public method

Test not found
public testNotFound ( )

testOptionalParameters() public method

Optional parameters

testPathRoute() public method

Simple path
public testPathRoute ( )

testPostRoute() public method

POST route
public testPostRoute ( )

testRegEx() public method

Test regular expression matching
public testRegEx ( )

testRegExParameters() public method

Passing URL parameters matched with regular expression
public testRegExParameters ( )

testRegexEmptyOptionalParameters() public method

Regex in optional parameters

testRegexOptionalParameters() public method

Regex in optional parameters

testRouteObjectPassing() public method

Check if route object was passed

testRouteWithParameters() public method

testSplatNamedPlusWildcard() public method

Test splat with named parameters

testSplatWildcard() public method

Test splat
public testSplatWildcard ( )

testSplatWildcardTrailingSlash() public method

Test splat without trailing slash

testUrlParameters() public method

Passing URL parameters
public testUrlParameters ( )

testWildcard() public method

Wildcard matching
public testWildcard ( )