PHP Класс Phalcon\Test\FunctionalTestCase

Наследование: extends ModelTestCase
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$application

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

assertAction() публичный метод

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

assertController() публичный метод

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

assertDispatchIsForwarded() публичный метод

Asserts that the dispatch is forwarded

assertHeader() публичный метод

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

assertRedirectTo() публичный метод

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

assertResponseCode() публичный метод

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

assertResponseContentContains() публичный метод

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

dispatch() защищенный метод

Dispatches a given url and sets the response object accordingly
protected dispatch ( string $url ) : void
$url string The request url
Результат void

getContent() публичный метод

Convenience method to retrieve response content
public getContent ( ) : string
Результат string

setUp() защищенный метод

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

tearDown() защищенный метод

Ensures that each test has it's own DI and all globals are purged
protected tearDown ( ) : void
Результат void

Описание свойств

$application защищенное свойство

protected $application