PHP Class Crud\Test\TestCase\Listener\ApiListenerTest

Inheritance: extends Crud\TestSuite\TestCase
Datei anzeigen Open project: friendsofcake/crud

Public Methods

Method Description
dataCheckRequestMethods ( ) : array data provider for testCheckRequestMethods
dataExceptionResponse ( ) : array Data provider for testExceptionResponse
dataExpandPath ( ) : array Data provider for testExpandPath
testBeforeHandle ( ) : void testBeforeHandle
testCheckRequestMethods ( $apiConfig, $exception, $requestMethods ) : void testCheckRequestMethods
testDefaultConfiguration ( ) : void Test default configuration
testEnsureData ( ) : void testEnsureData
testEnsureDataError ( ) : void testEnsureDataError
testEnsureDataRaw ( ) : void testEnsureDataRaw
testEnsureDataSubject ( ) : void testEnsureDataSubject
testEnsureSerializeAlreadySet ( ) : void testEnsureSerializeAlreadySet
testEnsureSerializeWithViewVar ( ) : void testEnsureSerializeWithViewVar
testEnsureSerializeWithViewVarChanged ( ) : void testEnsureSerializeWithViewVarChanged
testEnsureSerializeWithoutViewVar ( ) : void testEnsureSerializeWithoutViewVar
testEnsureSuccess ( ) : void testEnsureSuccess
testEnsureSuccessAlreadySet ( ) : void testEnsureSuccessAlreadySet
testExceptionResponse ( array $apiConfig, string $exceptionClass, string $exceptionMessage, integer $exceptionCode, array $validationErrors = [] ) : void Test _exceptionResponse
testExpandPath ( $subject, $path, $expected ) : void testExpandPath
testFlashMessageEnabled ( ) : void testFlashMessageEnabled
testFlashMessageSupressed ( ) : void testFlashMessageSupressed
testImplementedEvents ( ) : void Test implementedEvents with API request
testImplementedEventsWithoutApi ( ) : void Test implementedEvents without API request
testInjectViewClasses ( ) : void testInjectViewClasses
testResponse ( ) : void Test response method
testResponseWithExceptionConfig ( ) : void Test response method with exception config
testSetup ( ) : void testSetup
testSetupDetectors ( ) : void testSetupDetectors
testSetupDetectorsIntigration ( ) : void testSetupDetectorsIntigration
testViewClass ( ) : void testViewClass
testViewClassDefaults ( ) : void testViewClassDefaults

Method Details

dataCheckRequestMethods() public method

data provider for testCheckRequestMethods
public dataCheckRequestMethods ( ) : array
return array

dataExceptionResponse() public method

Data provider for testExceptionResponse
public dataExceptionResponse ( ) : array
return array

dataExpandPath() public method

Data provider for testExpandPath
public dataExpandPath ( ) : array
return array

testBeforeHandle() public method

testBeforeHandle
public testBeforeHandle ( ) : void
return void

testCheckRequestMethods() public method

testCheckRequestMethods
public testCheckRequestMethods ( $apiConfig, $exception, $requestMethods ) : void
return void

testDefaultConfiguration() public method

Test default configuration
public testDefaultConfiguration ( ) : void
return void

testEnsureData() public method

testEnsureData
public testEnsureData ( ) : void
return void

testEnsureDataError() public method

testEnsureDataError
public testEnsureDataError ( ) : void
return void

testEnsureDataRaw() public method

testEnsureDataRaw
public testEnsureDataRaw ( ) : void
return void

testEnsureDataSubject() public method

testEnsureDataSubject
public testEnsureDataSubject ( ) : void
return void

testEnsureSerializeAlreadySet() public method

testEnsureSerializeAlreadySet

testEnsureSerializeWithViewVar() public method

testEnsureSerializeWithViewVar

testEnsureSerializeWithViewVarChanged() public method

testEnsureSerializeWithViewVarChanged

testEnsureSerializeWithoutViewVar() public method

testEnsureSerializeWithoutViewVar

testEnsureSuccess() public method

testEnsureSuccess
public testEnsureSuccess ( ) : void
return void

testEnsureSuccessAlreadySet() public method

testEnsureSuccessAlreadySet
public testEnsureSuccessAlreadySet ( ) : void
return void

testExceptionResponse() public method

Test _exceptionResponse
public testExceptionResponse ( array $apiConfig, string $exceptionClass, string $exceptionMessage, integer $exceptionCode, array $validationErrors = [] ) : void
$apiConfig array
$exceptionClass string
$exceptionMessage string
$exceptionCode integer
$validationErrors array
return void

testExpandPath() public method

testExpandPath
public testExpandPath ( $subject, $path, $expected ) : void
return void

testFlashMessageEnabled() public method

There are use cases where you want to enable flash messages.
public testFlashMessageEnabled ( ) : void
return void

testFlashMessageSupressed() public method

The API listener should suppress flash messages if the request is "API"
public testFlashMessageSupressed ( ) : void
return void

testImplementedEvents() public method

Test implementedEvents with API request
public testImplementedEvents ( ) : void
return void

testImplementedEventsWithoutApi() public method

Test implementedEvents without API request

testInjectViewClasses() public method

testInjectViewClasses
public testInjectViewClasses ( ) : void
return void

testResponse() public method

Test response method
public testResponse ( ) : void
return void

testResponseWithExceptionConfig() public method

Test response method with exception config

testSetup() public method

testSetup
public testSetup ( ) : void
return void

testSetupDetectors() public method

testSetupDetectors
public testSetupDetectors ( ) : void
return void

testSetupDetectorsIntigration() public method

testSetupDetectorsIntigration

testViewClass() public method

Test that both set and get works
public testViewClass ( ) : void
return void

testViewClassDefaults() public method

Test that the default viewClasses are as expected
public testViewClassDefaults ( ) : void
return void