PHP Class Phalcon\Test\FunctionalTestCase

Inheritance: extends ModelTestCase
Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Protected Properties

Свойство Type Description
$application

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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 méthode

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

assertController() public méthode

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

assertDispatchIsForwarded() public méthode

Asserts that the dispatch is forwarded

assertHeader() public méthode

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 méthode

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

assertResponseCode() public méthode

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

assertResponseContentContains() public méthode

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

dispatch() protected méthode

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

getContent() public méthode

Convenience method to retrieve response content
public getContent ( ) : string
Résultat string

setUp() protected méthode

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

tearDown() protected méthode

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

Property Details

$application protected_oe property

protected $application