package Default

 Methods

Assert that the application route match used the given action

assertActionName(string $action) 

Parameters

$action

string

Assert the application exception and message

assertApplicationException($type, $message = null

Parameters

$type

application exception type

$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(integer $code) 

Parameters

$code

integer

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(integer $code) 

Parameters

$code

integer

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 = null, array|null $params = array(), $isXmlHttpRequest = false

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

Returns

\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

Returns

\Zend\ServiceManager\ServiceManager

Get the application request object

getRequest() : \Zend\Stdlib\RequestInterface

Returns

\Zend\Stdlib\RequestInterface

Get the application response object

getResponse() : \Zend\Stdlib\ResponseInterface

Returns

\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

Reset the request

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

Parameters

$keepPersistence

Returns

\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Set the application config

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

Parameters

$applicationConfig

array

Exceptions

\Zend\Stdlib\Exception\LogicException

Returns

\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Set the trace error flag

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

Parameters

$traceError

boolean

Returns

\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Set the usage of the console router or not

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

Parameters

$boolean

boolean

Returns

\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Trigger an application event

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

Parameters

$eventName

string

Returns

\Zend\EventManager\ResponseCollection

Set the request URL

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

Parameters

$url

string

$method

stringnull

$params

arraynull

Returns

\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

Get the full current controller class name

getControllerFullClassName() : string

Returns

string

Retrieve the response status code

getResponseStatusCode() : integer

Returns

integer

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

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

Parameters

$viewModel

\Zend\View\Model\ModelInterface

$templateName

string

Returns

boolean

Reset the application for isolation

setUp() 

Restore params

tearDown() 

 Properties

 

$application

$application : \Zend\Mvc\ApplicationInterface

Default

 

$applicationConfig

$applicationConfig : array

Default

 

Trace error when exception is throwed in application

$traceError : boolean

Default

true
 

Flag to use console router or not

$useConsoleRequest : boolean

Default

false
 

Flag console used before tests

$usedConsoleBackup : boolean

Default