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 not template name Assert that a template was not used somewhere in the view model tree

assertNotTemplateName(string $templateName) 

Parameters

$templateName

string

Assert response status code

assertResponseStatusCode(int $code) 

Parameters

$code

int

Assert template name Assert that a template was used somewhere in the view model tree

assertTemplateName(string $templateName) 

Parameters

$templateName

string

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

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

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

Parameters

$url

string

$method

stringnull

$params

arraynull

$isXmlHttpRequest

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() : bool

Returns

bool

Get the usage of the console router or not

getUseConsoleRequest() : bool

Returns

bool$boolean

Reset the request

reset($keepPersistence) : \Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Parameters

$keepPersistence

Returns

Set the application config

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

Set the trace error flag

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

Parameters

$traceError

bool

Returns

Set the usage of the console router or not

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

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

Recursively search a view model and it's children for the given templateName

searchTemplates(\Zend\View\Model\ModelInterface $viewModel, string $templateName) : boolean

Parameters

$templateName

string

Returns

boolean

Reset the application for isolation

setUp() 

Restore params

tearDown() 

 Properties

 

$application

$application : \Zend\Mvc\ApplicationInterface

 

$applicationConfig

$applicationConfig : array

 

Trace error when exception is throwed in application

$traceError : bool

 

Flag to use console router or not

$useConsoleRequest : bool

 

Flag console used before tests

$usedConsoleBackup : bool