PHP Класс OrnoTest\Route\DispatcherTest

Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

testClassBasedControllerInvokesCorrectMethod() публичный Метод

Asserts that the correct method is invoked on a class based controller
public testClassBasedControllerInvokesCorrectMethod ( ) : void
Результат void

testClassBasedControllerInvokesCorrectMethodOnMethodArgumentStrategy() публичный Метод

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

testClassBasedControllerRouteThrowsExceptionWhenNoFunctionPresent() публичный Метод

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

testCustomStrategyIsDispatchedCorrectly() публичный Метод

Asserts that a custom strategy is dispatched correctly and the return of that method bubbles out to the dispatcher
public testCustomStrategyIsDispatchedCorrectly ( ) : void
Результат void

testDispatcherHandles404CorrectlyOnRestfulStrategy() публичный Метод

Asserts that a 404 response is returned whilst using restful strategy

testDispatcherHandles404CorrectlyOnStandardStrategies() публичный Метод

Asserts that a 404 exception is thrown whilst using standard strategies

testDispatcherHandles405CorrectlyOnRestfulStrategy() публичный Метод

Asserts that a 405 response is returned whilst using restful strategy

testDispatcherHandles405CorrectlyOnStandardStrategies() публичный Метод

Asserts that a 405 exception is thrown whilst using standard strategies

testMethodArgumentStrategyRouteThrowsExceptionWhenResponseCannotBeBuilt() публичный Метод

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

testRequestResponseStrategyRouteReceivesCorrectArguments() публичный Метод

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

testRequestResponseStrategyRouteThrowsExceptionWhenWrongResponseReturned() публичный Метод

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

testRestfulStrategyReceivesCorrectArguments() публичный Метод

Assert that a route using the Restful Strategy gets passed the correct arguments
public testRestfulStrategyReceivesCorrectArguments ( ) : void
Результат void

testRestfulStrategyReturnsJsonResponseWhenHttpExceptionIsThrown() публичный Метод

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

testRestfulStrategyRouteReturnsResponseWhenControllerDoes() публичный Метод

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

testRestfulStrategyRouteThrowsExceptionWhenWrongResponseReturned() публичный Метод

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

testUriStrategyRouteReceivesCorrectArguments() публичный Метод

Assert that a route using the URI Strategy gets passed the correct arguments
public testUriStrategyRouteReceivesCorrectArguments ( ) : void
Результат void

testUriStrategyRouteReturnsResponseWhenControllerDoes() публичный Метод

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

testUriStrategyRouteThrowsExceptionWhenResponseCannotBeBuilt() публичный Метод

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