PHP Класс Sanpi\Behatch\Context\RestContext

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

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

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

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

Метод Описание
__construct ( Request $request )
iAddHeaderEqualTo ( $name, $value ) Add an header element in a request
iSendARequestTo ( $method, $url, Behat\Gherkin\Node\PyStringNode $body = null, $files = [] ) Sends a HTTP request
iSendARequestToWithBody ( $method, $url, Behat\Gherkin\Node\PyStringNode $body ) Sends a HTTP request with a body
iSendARequestToWithParameters ( $method, $url, Behat\Gherkin\Node\TableNode $datas ) Sends a HTTP request with a some parameters
printLastResponseHeaders ( )
printTheCorrespondingCurlCommand ( )
theHeaderShouldBeContains ( $name, $value ) Checks, whether the header name contains the given text
theHeaderShouldBeEqualTo ( $name, $value ) Checks, whether the header name is equal to given text
theHeaderShouldNotContain ( $name, $value ) Checks, whether the header name doesn't contain the given text
theHeaderShouldNotExist ( $name ) Checks, whether the header not exist
theResponseShouldBeEmpty ( ) Checks, whether the response content is null or empty string
theResponseShouldBeEncodedIn ( $encoding )
theResponseShouldBeEqualTo ( Behat\Gherkin\Node\PyStringNode $expected ) Checks, whether the response content is equal to given text
theResponseShouldExpireInTheFuture ( ) Checks, that the response header expire is in the future

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

Метод Описание
theHeaderShouldExist ( $name )

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

__construct() публичный Метод

public __construct ( Request $request )
$request Sanpi\Behatch\HttpCall\Request

iAddHeaderEqualTo() публичный Метод

Add an header element in a request
public iAddHeaderEqualTo ( $name, $value )

iSendARequestTo() публичный Метод

Sends a HTTP request
public iSendARequestTo ( $method, $url, Behat\Gherkin\Node\PyStringNode $body = null, $files = [] )
$body Behat\Gherkin\Node\PyStringNode

iSendARequestToWithBody() публичный Метод

Sends a HTTP request with a body
public iSendARequestToWithBody ( $method, $url, Behat\Gherkin\Node\PyStringNode $body )
$body Behat\Gherkin\Node\PyStringNode

iSendARequestToWithParameters() публичный Метод

Sends a HTTP request with a some parameters
public iSendARequestToWithParameters ( $method, $url, Behat\Gherkin\Node\TableNode $datas )
$datas Behat\Gherkin\Node\TableNode

printLastResponseHeaders() публичный Метод

printTheCorrespondingCurlCommand() публичный Метод

theHeaderShouldBeContains() публичный Метод

Checks, whether the header name contains the given text
public theHeaderShouldBeContains ( $name, $value )

theHeaderShouldBeEqualTo() публичный Метод

Checks, whether the header name is equal to given text
public theHeaderShouldBeEqualTo ( $name, $value )

theHeaderShouldExist() защищенный Метод

protected theHeaderShouldExist ( $name )

theHeaderShouldNotContain() публичный Метод

Checks, whether the header name doesn't contain the given text
public theHeaderShouldNotContain ( $name, $value )

theHeaderShouldNotExist() публичный Метод

Checks, whether the header not exist
public theHeaderShouldNotExist ( $name )

theResponseShouldBeEmpty() публичный Метод

Checks, whether the response content is null or empty string

theResponseShouldBeEncodedIn() публичный Метод

public theResponseShouldBeEncodedIn ( $encoding )

theResponseShouldBeEqualTo() публичный Метод

Checks, whether the response content is equal to given text
public theResponseShouldBeEqualTo ( Behat\Gherkin\Node\PyStringNode $expected )
$expected Behat\Gherkin\Node\PyStringNode

theResponseShouldExpireInTheFuture() публичный Метод

Checks, that the response header expire is in the future

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

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

protected $request