|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| compare ($filteredHeaders, $actualHeaders) | |
| compareArray (array $expected, $actual, array $ignore=array(), array $absent=array()) | |
Protected Member Functions | |
| hasKey ($key, $array) | |
Class used to compare HTTP headers using a custom DSL
Definition at line 11 of file HeaderComparison.php.
| Guzzle\Tests\Http\Message\HeaderComparison::compare | ( | $filteredHeaders, | |
| $actualHeaders | |||
| ) |
Compare HTTP headers and use special markup to filter values A header prefixed with '!' means it must not exist A header prefixed with '_' means it must be ignored A header value of '*' means anything after the * will be ignored
| array | $filteredHeaders | Array of special headers |
| array | $actualHeaders | Array of headers to check against |
Definition at line 24 of file HeaderComparison.php.
References Guzzle\Tests\Http\Message\HeaderComparison\compareArray().
| Guzzle\Tests\Http\Message\HeaderComparison::compareArray | ( | array | $expected, |
| $actual, | |||
| array | $ignore = array(), |
||
| array | $absent = array() |
||
| ) |
Check if an array of HTTP headers matches another array of HTTP headers while taking * into account as a wildcard
| array | $expected | Expected HTTP headers (allows wildcard values) |
| array | Collection | $actual | Actual HTTP header array |
| array | $ignore | Headers to ignore from the comparison |
| array | $absent | Array of headers that must not be present |
Definition at line 59 of file HeaderComparison.php.
References Guzzle\Tests\Http\Message\HeaderComparison\hasKey().
Referenced by Guzzle\Tests\Http\Message\HeaderComparison\compare().
|
protected |
Case insensitive check if an array have a key
| string | $key | Key to check |
| array | $array | Array to check |
Definition at line 119 of file HeaderComparison.php.
Referenced by Guzzle\Tests\Http\Message\HeaderComparison\compareArray().