Methods

Assert that the application route match used the given action

assertActionName(string $action) 

Parameters

$action

string

Assert the application exception and message

assertApplicationException(\Zend\Test\PHPUnit\Controller\$type $type, \Zend\Test\PHPUnit\Controller\$message $message) 

Parameters

$type

\Zend\Test\PHPUnit\Controller\$type

application exception type

$message

\Zend\Test\PHPUnit\Controller\$message

application exception message

Assert that the application route match used the given controller class

assertControllerClass(string $controller) 

Parameters

$controller

string

Assert that the application route match used the given controller name

assertControllerName(string $controller) 

Parameters

$controller

string

Assert that the application route match used the given route name

assertMatchedRouteName(string $route) 

Parameters

$route

string

Assert that the application route match used the given module

assertModuleName(string $module) 

Parameters

$module

string

Assert modules were loaded with the module manager

assertModulesLoaded(array $modules) 

Parameters

$modules

array

Assert that the application route match used NOT the given action

assertNotActionName(string $action) 

Parameters

$action

string

Assert that the application route match used NOT the given controller class

assertNotControllerClass(string $controller) 

Parameters

$controller

string

Assert that the application route match used NOT the given controller name

assertNotControllerName(string $controller) 

Parameters

$controller

string

Assert that the application route match used NOT the given route name

assertNotMatchedRouteName(string $route) 

Parameters

$route

string

Assert that the application route match used NOT the given module

assertNotModuleName(string $module) 

Parameters

$module

string

Assert modules were not loaded with the module manager

assertNotModulesLoaded(array $modules) 

Parameters

$modules

array

Assert not response status code

assertNotResponseStatusCode(int $code) 

Parameters

$code

int

Assert response status code

assertResponseStatusCode(int $code) 

Parameters

$code

int

Dispatch the MVC with an URL Accept a HTTP (simulate a customer action) or console route.

dispatch(string $url, string | null $method, array | null $params) 

The URL provided set the request URI in the request object.

Parameters

$url

string

$method

stringnull

$params

arraynull

Exceptions

\Exception

Get the application object

getApplication() : \Zend\Mvc\ApplicationInterface

Get the application config

getApplicationConfig() : array

Returns

arraythe application config

Get the service manager of the application object

getApplicationServiceLocator() : \Zend\ServiceManager\ServiceManager

Get the application request object

getRequest() : \Zend\Stdlib\RequestInterface

Get the application response object

getResponse() : \Zend\Stdlib\ResponseInterface

Get the trace error flag

getTraceError() : boolean

Returns

boolean

Get the usage of the console router or not

getUseConsoleRequest() : boolean

Returns

boolean$boolean

Set the application config

setApplicationConfig(array $applicationConfig) : \Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Set the trace error flag

setTraceError(boolean $traceError) : \Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Parameters

$traceError

boolean

Returns

Reset the application for isolation

setUp() 

Set the usage of the console router or not

setUseConsoleRequest(boolean $boolean) : \Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Parameters

$boolean

boolean

Returns

Restore params

tearDown() 

Trigger an application event

triggerApplicationEvent(string $eventName) : \Zend\EventManager\ResponseCollection

Parameters

$eventName

string

Returns

Set the request URL

url(string $url, string | null $method, array | null $params) : \Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Parameters

$url

string

$method

stringnull

$params

arraynull

Returns

Get the full current controller class name

getControllerFullClassName() : string

Returns

string

Retrieve the response status code

getResponseStatusCode() : int

Returns

int

 Properties

 

Trace error when exception is throwed in application

$traceError : boolean

 

Flag to use console router or not

$useConsoleRequest : boolean

 

$application

$application : \Zend\Mvc\ApplicationInterface

 

$applicationConfig

$applicationConfig : array

 

Flag console used before tests

$usedConsoleBackup : boolean