PHP Class lithium\tests\cases\action\ControllerTest

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

Méthodes publiques

Méthode Description
testConstructionWithCustomRequest ( ) Tests that controllers can be instantiated with custom request objects.
testDispatchingWithExplicitControllerName ( ) Tests that requests which are dispotched with the controller route parameter specified as a fully-qualified class name are able to locate their templates correctly.
testLibraryScoping ( ) Tests that the library of the controller is automatically added to the default rendering options.
testManuallySettingTemplate ( ) Tests that $_render['template'] can be manually set in a controller action and will not be overwritten.
testMethodInvocation ( ) Tests the use of Controller::__invoke() for dispatching requests to action methods. Also tests that using PHP's callable syntax yields the same result as calling __invoke() explicitly.
testNonExistentFunction ( )
testProtectedMethodAccessAttempt ( ) Verifies that protected methods (i.e. prefixed with '_'), and methods declared in the Controller base class cannot be accessed.
testRedirectResponse ( ) Tests that calls to Controller::redirect() correctly write redirect headers to the response object.
testRenderPropertyInheritance ( )
testRenderWithAlternateTemplate ( ) Tests calling Controller::render() with parameters to render an alternate template from the default.
testRenderWithDataArray ( ) Verifies that data array is passed on to controller's response.
testRenderWithDataSingleIndexedArray ( ) Verifies that the Controller does not modify data when passed an array (or RecordSet) with a single element.
testRenderWithNamespacedController ( ) Tests that requests where the controller class is specified manually continue to route to the correct template path.
testResponseStatus ( )
testResponseTypeBasedOnRequestHeaderType ( )
testResponseTypeBasedOnRequestParamsType ( )
testResponseTypeBasedOnRequestType ( )
testSetData ( )

Method Details

testConstructionWithCustomRequest() public méthode

Tests that controllers can be instantiated with custom request objects.

testDispatchingWithExplicitControllerName() public méthode

Tests that requests which are dispotched with the controller route parameter specified as a fully-qualified class name are able to locate their templates correctly.

testLibraryScoping() public méthode

Tests that the library of the controller is automatically added to the default rendering options.
public testLibraryScoping ( )

testManuallySettingTemplate() public méthode

Tests that $_render['template'] can be manually set in a controller action and will not be overwritten.

testMethodInvocation() public méthode

Tests the use of Controller::__invoke() for dispatching requests to action methods. Also tests that using PHP's callable syntax yields the same result as calling __invoke() explicitly.

testNonExistentFunction() public méthode

testProtectedMethodAccessAttempt() public méthode

Verifies that protected methods (i.e. prefixed with '_'), and methods declared in the Controller base class cannot be accessed.

testRedirectResponse() public méthode

Tests that calls to Controller::redirect() correctly write redirect headers to the response object.

testRenderPropertyInheritance() public méthode

testRenderWithAlternateTemplate() public méthode

Tests calling Controller::render() with parameters to render an alternate template from the default.

testRenderWithDataArray() public méthode

Verifies that data array is passed on to controller's response.

testRenderWithDataSingleIndexedArray() public méthode

Verifies that the Controller does not modify data when passed an array (or RecordSet) with a single element.

testRenderWithNamespacedController() public méthode

Tests that requests where the controller class is specified manually continue to route to the correct template path.

testResponseStatus() public méthode

public testResponseStatus ( )

testResponseTypeBasedOnRequestHeaderType() public méthode

testResponseTypeBasedOnRequestParamsType() public méthode

testResponseTypeBasedOnRequestType() public méthode

testSetData() public méthode

public testSetData ( )