PHP Class OrnoTest\Route\DispatcherTest

Inheritance: extends PHPUnit_Framework_TestCase
Mostrar archivo Open project: orno/route

Public Methods

Method Description
testClassBasedControllerInvokesCorrectMethod ( ) : void Asserts that the correct method is invoked on a class based controller
testClassBasedControllerInvokesCorrectMethodOnMethodArgumentStrategy ( ) : void Asserts that the correct method is invoked on a class based controller
testClassBasedControllerRouteThrowsExceptionWhenNoFunctionPresent ( ) : void Assert that an exception is thrown when no controller method is specified
testCustomStrategyIsDispatchedCorrectly ( ) : void Asserts that a custom strategy is dispatched correctly and the return of that method bubbles out to the dispatcher
testDispatcherHandles404CorrectlyOnRestfulStrategy ( ) : void Asserts that a 404 response is returned whilst using restful strategy
testDispatcherHandles404CorrectlyOnStandardStrategies ( ) : void Asserts that a 404 exception is thrown whilst using standard strategies
testDispatcherHandles405CorrectlyOnRestfulStrategy ( ) : void Asserts that a 405 response is returned whilst using restful strategy
testDispatcherHandles405CorrectlyOnStandardStrategies ( ) : void Asserts that a 405 exception is thrown whilst using standard strategies
testMethodArgumentStrategyRouteThrowsExceptionWhenResponseCannotBeBuilt ( ) : void Assert that a route using the Method Argument Strategy throws exception when Response cannot be built
testRequestResponseStrategyRouteReceivesCorrectArguments ( ) : void Assert that a route using the Request -> Response Strategy gets passed the correct arguments
testRequestResponseStrategyRouteThrowsExceptionWhenWrongResponseReturned ( ) : void Assert that a route using the Request -> Response Strategy throws exception when correct response not returned
testRestfulStrategyReceivesCorrectArguments ( ) : void Assert that a route using the Restful Strategy gets passed the correct arguments
testRestfulStrategyReturnsJsonResponseWhenHttpExceptionIsThrown ( ) : void Assert that a route using the Restful Strategy returns a json response when a http exception is thrown
testRestfulStrategyRouteReturnsResponseWhenControllerDoes ( ) : void Assert that a route using the Restful Strategy returns response when controller does
testRestfulStrategyRouteThrowsExceptionWhenWrongResponseReturned ( ) : void Assert that a route using Restful Strategy throws exception for wrong response type
testUriStrategyRouteReceivesCorrectArguments ( ) : void Assert that a route using the URI Strategy gets passed the correct arguments
testUriStrategyRouteReturnsResponseWhenControllerDoes ( ) : void Assert that a route using the URI Strategy returns response when controller does
testUriStrategyRouteThrowsExceptionWhenResponseCannotBeBuilt ( ) : void Assert that a route using the URI Strategy throws exception when Response cannot be built

Method Details

testClassBasedControllerInvokesCorrectMethod() public method

Asserts that the correct method is invoked on a class based controller

testClassBasedControllerInvokesCorrectMethodOnMethodArgumentStrategy() public method

Asserts that the correct method is invoked on a class based controller

testClassBasedControllerRouteThrowsExceptionWhenNoFunctionPresent() public method

Assert that an exception is thrown when no controller method is specified

testCustomStrategyIsDispatchedCorrectly() public method

Asserts that a custom strategy is dispatched correctly and the return of that method bubbles out to the dispatcher

testDispatcherHandles404CorrectlyOnRestfulStrategy() public method

Asserts that a 404 response is returned whilst using restful strategy

testDispatcherHandles404CorrectlyOnStandardStrategies() public method

Asserts that a 404 exception is thrown whilst using standard strategies

testDispatcherHandles405CorrectlyOnRestfulStrategy() public method

Asserts that a 405 response is returned whilst using restful strategy

testDispatcherHandles405CorrectlyOnStandardStrategies() public method

Asserts that a 405 exception is thrown whilst using standard strategies

testMethodArgumentStrategyRouteThrowsExceptionWhenResponseCannotBeBuilt() public method

Assert that a route using the Method Argument Strategy throws exception when Response cannot be built

testRequestResponseStrategyRouteReceivesCorrectArguments() public method

Assert that a route using the Request -> Response Strategy gets passed the correct arguments

testRequestResponseStrategyRouteThrowsExceptionWhenWrongResponseReturned() public method

Assert that a route using the Request -> Response Strategy throws exception when correct response not returned

testRestfulStrategyReceivesCorrectArguments() public method

Assert that a route using the Restful Strategy gets passed the correct arguments

testRestfulStrategyReturnsJsonResponseWhenHttpExceptionIsThrown() public method

Assert that a route using the Restful Strategy returns a json response when a http exception is thrown

testRestfulStrategyRouteReturnsResponseWhenControllerDoes() public method

Assert that a route using the Restful Strategy returns response when controller does

testRestfulStrategyRouteThrowsExceptionWhenWrongResponseReturned() public method

Assert that a route using Restful Strategy throws exception for wrong response type

testUriStrategyRouteReceivesCorrectArguments() public method

Assert that a route using the URI Strategy gets passed the correct arguments

testUriStrategyRouteReturnsResponseWhenControllerDoes() public method

Assert that a route using the URI Strategy returns response when controller does

testUriStrategyRouteThrowsExceptionWhenResponseCannotBeBuilt() public method

Assert that a route using the URI Strategy throws exception when Response cannot be built