PHP Class Phalcon\Test\FunctionalTestCase

Inheritance: extends ModelTestCase
Datei anzeigen Open project: phalcon/incubator Class Usage Examples

Protected Properties

Property Type Description
$application

Public Methods

Method Description
assertAction ( string $expected ) Assert that the last dispatched action matches the given action name
assertController ( string $expected ) Assert that the last dispatched controller matches the given controller class name
assertDispatchIsForwarded ( ) Asserts that the dispatch is forwarded
assertHeader ( array $expected ) Assert that the response headers contains the given array $expected = ['Content-Type' => 'application/json']
assertRedirectTo ( string $location ) Assert location redirect
assertResponseCode ( string $expected ) Asserts that the response code matches the given one
assertResponseContentContains ( string $string ) Assert response content contains string
getContent ( ) : string Convenience method to retrieve response content

Protected Methods

Method Description
dispatch ( string $url ) : void Dispatches a given url and sets the response object accordingly
setUp ( ) This method is called before a test is executed.
tearDown ( ) : void Ensures that each test has it's own DI and all globals are purged

Method Details

assertAction() public method

Assert that the last dispatched action matches the given action name
public assertAction ( string $expected )
$expected string The expected action name

assertController() public method

Assert that the last dispatched controller matches the given controller class name
public assertController ( string $expected )
$expected string The expected controller name

assertDispatchIsForwarded() public method

Asserts that the dispatch is forwarded

assertHeader() public method

Assert that the response headers contains the given array $expected = ['Content-Type' => 'application/json']
public assertHeader ( array $expected )
$expected array The expected headers

assertRedirectTo() public method

Assert location redirect
public assertRedirectTo ( string $location )
$location string

assertResponseCode() public method

Asserts that the response code matches the given one
public assertResponseCode ( string $expected )
$expected string the expected response code

assertResponseContentContains() public method

Assert response content contains string
public assertResponseContentContains ( string $string )
$string string

dispatch() protected method

Dispatches a given url and sets the response object accordingly
protected dispatch ( string $url ) : void
$url string The request url
return void

getContent() public method

Convenience method to retrieve response content
public getContent ( ) : string
return string

setUp() protected method

This method is called before a test is executed.
protected setUp ( )

tearDown() protected method

Ensures that each test has it's own DI and all globals are purged
protected tearDown ( ) : void
return void

Property Details

$application protected_oe property

protected $application