PHP 클래스 Crud\Test\TestCase\Action\AddActionTest

파일 보기 프로젝트 열기: friendsofcake/crud

공개 프로퍼티들

프로퍼티 타입 설명
$fixtures array fixtures property
$tableClass string Table class to mock on

공개 메소드들

메소드 설명
apiGetHttpMethodProvider ( ) : array Data provider with GET and DELETE verbs
apiUpdateHttpMethodProvider ( ) : array Data provider with PUT and POST verbs
testActionGet ( ) : void Test the normal HTTP GET flow of _get
testActionGetWithQueryArgs ( ) : void Test the normal HTTP GET flow of _get with query args
testActionPost ( ) : void Test POST will create a record
testActionPostErrorSave ( ) : void Test POST with unsuccessful save()
testActionPostValidationErrors ( ) : void Test POST with validation errors
testActionPostWithAddRedirect ( ) : void Test POST will create a record and redirect to /blogs/add again if _POST['_add'] is present
testActionPostWithEditRedirect ( ) : void Test POST will create a record and redirect to /blogs/edit/$id if _POST['_edit'] is present
testApiCreate ( string $method ) : void Test POST & PUT verbs using API Listener
testApiCreateError ( string $method ) : void Test POST & PUT verbs using API Listener with data validation error
testApiCreateErrors ( string $method ) : void Test POST & PUT verbs using API Listener with data validation errors
testApiGet ( string $method ) : void Test HTTP & DELETE verbs using API Listener

메소드 상세

apiGetHttpMethodProvider() 공개 메소드

Data provider with GET and DELETE verbs
public apiGetHttpMethodProvider ( ) : array
리턴 array

apiUpdateHttpMethodProvider() 공개 메소드

Data provider with PUT and POST verbs

testActionGet() 공개 메소드

Test the normal HTTP GET flow of _get
public testActionGet ( ) : void
리턴 void

testActionGetWithQueryArgs() 공개 메소드

Providing ?name=test should fill out the value in the 'name' input field
public testActionGetWithQueryArgs ( ) : void
리턴 void

testActionPost() 공개 메소드

Test POST will create a record
public testActionPost ( ) : void
리턴 void

testActionPostErrorSave() 공개 메소드

Test POST with unsuccessful save()
public testActionPostErrorSave ( ) : void
리턴 void

testActionPostValidationErrors() 공개 메소드

Test POST with validation errors

testActionPostWithAddRedirect() 공개 메소드

Test POST will create a record and redirect to /blogs/add again if _POST['_add'] is present

testActionPostWithEditRedirect() 공개 메소드

Test POST will create a record and redirect to /blogs/edit/$id if _POST['_edit'] is present

testApiCreate() 공개 메소드

Test POST & PUT verbs using API Listener
public testApiCreate ( string $method ) : void
$method string
리턴 void

testApiCreateError() 공개 메소드

Test POST & PUT verbs using API Listener with data validation error
public testApiCreateError ( string $method ) : void
$method string
리턴 void

testApiCreateErrors() 공개 메소드

Test POST & PUT verbs using API Listener with data validation errors
public testApiCreateErrors ( string $method ) : void
$method string
리턴 void

testApiGet() 공개 메소드

Test HTTP & DELETE verbs using API Listener
public testApiGet ( string $method ) : void
$method string
리턴 void

프로퍼티 상세

$fixtures 공개적으로 프로퍼티

fixtures property
public array $fixtures
리턴 array

$tableClass 공개적으로 프로퍼티

Table class to mock on
public string $tableClass
리턴 string