|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| HttpHeaderExpectation ($header, $value=false, $message= '%s') | |
| _getExpectation () | |
| _normaliseHeader ($header) | |
| test ($compare) | |
| _findHeader ($compare) | |
| _testHeaderLine ($line) | |
| _testHeaderValue ($value, $expected) | |
| testMessage ($compare) | |
Data Fields | |
| $_expected_header | |
| $_expected_value | |
Definition at line 134 of file web_tester.php.
| _findHeader | ( | $ | compare | ) |
Searches the incoming result. Will extract the matching line as text.
| mixed | $compare | Raw header block to search. |
Definition at line 192 of file web_tester.php.


| _getExpectation | ( | ) |
Accessor for aggregated object.
Definition at line 159 of file web_tester.php.

| _normaliseHeader | ( | $ | header | ) |
Removes whitespace at ends and case variations.
| string | $header | Name of header. |
| string | Trimmed and lowecased header name. private |
Definition at line 170 of file web_tester.php.

| _testHeaderLine | ( | $ | line | ) |
Compares a single header line against the expectation.
| string | $line | A single line to compare. |
Definition at line 208 of file web_tester.php.


| _testHeaderValue | ( | $ | value, |
| $ | expected | ||
| ) |
Tests the value part of the header.
| string | $value | Value to test. |
| mixed | $expected | Value to test against. |
Definition at line 226 of file web_tester.php.


| HttpHeaderExpectation | ( | $ | header, |
| $ | value = false, |
||
| $ | message = '%s' |
||
| ) |
Sets the field and value to compare against.
| string | $header | Case insenstive trimmed header name. |
| mixed | $value | Optional value to compare. If not given then any value will match. If an expectation object then that will be used instead. |
| string | $message | Optiona message override. Can use s as a placeholder for the original message. |
Definition at line 148 of file web_tester.php.


| test | ( | $ | compare | ) |
Tests the expectation. True if it matches a string value or an array value in any order.
| mixed | $compare | Raw header block to search. |
Reimplemented from SimpleExpectation.
Reimplemented in NoHttpHeaderExpectation.
Definition at line 181 of file web_tester.php.

| testMessage | ( | $ | compare | ) |
Returns a human readable test message.
| mixed | $compare | Raw header block to search. |
Reimplemented from SimpleExpectation.
Reimplemented in NoHttpHeaderExpectation.
Definition at line 243 of file web_tester.php.

| $_expected_header |
Reimplemented in NoHttpHeaderExpectation.
Definition at line 135 of file web_tester.php.
| $_expected_value |
Reimplemented in NoHttpHeaderExpectation.
Definition at line 136 of file web_tester.php.