PHP 클래스 lithium\tests\cases\action\ControllerTest

상속: extends lithium\test\Unit
파일 보기 프로젝트 열기: unionofrad/lithium

공개 메소드들

메소드 설명
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 ( )

메소드 상세

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.
public testLibraryScoping ( )

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() 공개 메소드

public testResponseStatus ( )

testResponseTypeBasedOnRequestHeaderType() 공개 메소드

testResponseTypeBasedOnRequestParamsType() 공개 메소드

testResponseTypeBasedOnRequestType() 공개 메소드

testSetData() 공개 메소드

public testSetData ( )