PHP Class Sanpi\Behatch\Context\RestContext

Inheritance: extends BaseContext
Afficher le fichier Open project: behatch/contexts Class Usage Examples

Protected Properties

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

Méthodes publiques

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

Méthodes protégées

Méthode Description
theHeaderShouldExist ( $name )

Method Details

__construct() public méthode

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

iAddHeaderEqualTo() public méthode

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

iSendARequestTo() public méthode

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

iSendARequestToWithBody() public méthode

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

iSendARequestToWithParameters() public méthode

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

printLastResponseHeaders() public méthode

printTheCorrespondingCurlCommand() public méthode

theHeaderShouldBeContains() public méthode

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

theHeaderShouldBeEqualTo() public méthode

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

theHeaderShouldExist() protected méthode

protected theHeaderShouldExist ( $name )

theHeaderShouldNotContain() public méthode

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

theHeaderShouldNotExist() public méthode

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

theResponseShouldBeEmpty() public méthode

Checks, whether the response content is null or empty string

theResponseShouldBeEncodedIn() public méthode

public theResponseShouldBeEncodedIn ( $encoding )

theResponseShouldBeEqualTo() public méthode

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

theResponseShouldExpireInTheFuture() public méthode

Checks, that the response header expire is in the future

Property Details

$request protected_oe property

protected $request