Property | Type | Description | |
---|---|---|---|
$client | Guzzle\Http\Client | Guzzle client used to make requests against the httpd | |
$queryParams | array | Query parameters for the request | |
$requestBody | string | Optional request body to add to the request | |
$requestHeaders | array | Headers for the request | |
$responses | Guzzle\Http\Message\Response[] | The current response objects used by the client (populated when the request is sent) |
Method | Description | |
---|---|---|
__construct ( array $parameters ) | Class constructor | |
appendQueryStringParameter ( $queryParam, $value ) | ||
assertEmptyResponseBody ( ) | ||
assertEqualResponseHeaders ( Behat\Gherkin\Node\PyStringNode $list ) | ||
assertExistingHeaders ( Behat\Gherkin\Node\PyStringNode $list ) | ||
assertHeaderDoesNotExist ( $header ) | ||
assertHeaderNotSameForPreviousRequests ( $header ) | ||
assertMaxAge ( $seconds ) | ||
assertMissingHeaders ( Behat\Gherkin\Node\PyStringNode $list ) | ||
assertMustRevalidate ( $doesNotHave = false ) | ||
assertResponseBody ( $match, Behat\Gherkin\Node\PyStringNode $expected ) | ||
assertResponseBodyLength ( $length ) | ||
assertResponseHeader ( $header, $match, $value ) | ||
assertResponseIsCacheable ( $cacheable = true ) | ||
assertResponseStatus ( $status ) | ||
attachFileToRequestBody ( $path ) | ||
makeSameRequest ( $method ) | ||
performRequestWithGivenQueryString ( $path ) | ||
request ( $path, $method = 'GET' ) | ||
setOverrideMethodHeader ( string $method ) | Set method override header used to fake non-standard HTTP verbs | |
setRequestBody ( Behat\Gherkin\Node\PyStringNode $body ) | ||
setRequestHeader ( $header, $value ) | ||
setUp ( Behat\Behat\Event\SuiteEvent $event ) | Start up the built in httpd in php-5.4 | |
tearDown ( Behat\Behat\Event\SuiteEvent $event ) | Collect code coverage after the suite has been run |
Method | Description | |
---|---|---|
addHeaderToNextRequest ( string $key, mixed $value ) | Add a request header for the next request | |
getLastResponse ( ) : Guzzle\Http\Message\Response | Get the response to the last request made by the Guzzle client | |
getPreviousCacheControlHeader ( ) : Guzzle\Http\Message\Header\CacheControl | Get the cache-control header for the previous response |
Method | Description | |
---|---|---|
canConnectToHttpd ( string $host, integer $port ) : boolean | See if we have an httpd we can connect to | |
createClient ( ) | Create a new HTTP client | |
getOverrideVerbs ( ) | Returns a list of HTTP verbs that we need to do an override of in order to bypass limitations in the built-in PHP HTTP server. | |
startBuiltInHttpd ( string $host, integer $port, string $documentRoot, string $router, string $httpdLog ) : integer | Start the built in httpd in php-5.4 |
public __construct ( array $parameters ) | ||
$parameters | array | Context parameters |
protected addHeaderToNextRequest ( string $key, mixed $value ) | ||
$key | string | The name of the header |
$value | mixed | The value of the header |
public appendQueryStringParameter ( $queryParam, $value ) |
public assertEqualResponseHeaders ( Behat\Gherkin\Node\PyStringNode $list ) | ||
$list | Behat\Gherkin\Node\PyStringNode |
public assertExistingHeaders ( Behat\Gherkin\Node\PyStringNode $list ) | ||
$list | Behat\Gherkin\Node\PyStringNode |
public assertHeaderNotSameForPreviousRequests ( $header ) |
public assertMissingHeaders ( Behat\Gherkin\Node\PyStringNode $list ) | ||
$list | Behat\Gherkin\Node\PyStringNode |
public assertResponseBody ( $match, Behat\Gherkin\Node\PyStringNode $expected ) | ||
$expected | Behat\Gherkin\Node\PyStringNode |
protected getLastResponse ( ) : Guzzle\Http\Message\Response | ||
return | Guzzle\Http\Message\Response |
protected getPreviousCacheControlHeader ( ) : Guzzle\Http\Message\Header\CacheControl | ||
return | Guzzle\Http\Message\Header\CacheControl | The Cache-Control header for the previous response |
public performRequestWithGivenQueryString ( $path ) |
public setOverrideMethodHeader ( string $method ) | ||
$method | string | Override method |
public setRequestBody ( Behat\Gherkin\Node\PyStringNode $body ) | ||
$body | Behat\Gherkin\Node\PyStringNode |
public static setUp ( Behat\Behat\Event\SuiteEvent $event ) | ||
$event | Behat\Behat\Event\SuiteEvent |
public static tearDown ( Behat\Behat\Event\SuiteEvent $event ) | ||
$event | Behat\Behat\Event\SuiteEvent |
protected Client,Guzzle\Http $client | ||
return | Guzzle\Http\Client |
protected array $queryParams | ||
return | array |
protected string $requestBody | ||
return | string |
protected array $requestHeaders | ||
return | array |