|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| SimpleErrorQueue () | |
| clear () | |
| setTestCase (&$test) | |
| expectError ($expected, $message) | |
| add ($severity, $content, $filename, $line) | |
| tally () | |
| _testLatestError ($severity, $content, $filename, $line) | |
| extract () | |
| _extractExpectation () | |
| assertNoErrors ($message) | |
| assertError ($expected, $message) | |
Static Public Member Functions | |
| getSeverityAsString ($severity) | |
Data Fields | |
| $_queue | |
| $_expectation_queue | |
| $_test | |
| $_using_expect_style = false | |
Definition at line 85 of file errors.php.
Pulls the earliest expectation from the queue.
Definition at line 207 of file errors.php.

| _testLatestError | ( | $ | severity, |
| $ | content, | ||
| $ | filename, | ||
| $ | line | ||
| ) |
Tests the error against the most recent expected error.
| integer | $severity | PHP error code. |
| string | $content | Text of error. |
| string | $filename | File error occoured in. |
| integer | $line | Line number of error. private |
Definition at line 173 of file errors.php.


| add | ( | $ | severity, |
| $ | content, | ||
| $ | filename, | ||
| $ | line | ||
| ) |
Adds an error to the front of the queue.
| integer | $severity | PHP error code. |
| string | $content | Text of error. |
| string | $filename | File error occoured in. |
| integer | $line | Line number of error. public |
Definition at line 138 of file errors.php.

| assertError | ( | $ | expected, |
| $ | message | ||
| ) |
| assertNoErrors | ( | $ | message | ) |
Definition at line 217 of file errors.php.
| clear | ( | ) |
Discards the contents of the error queue. public
Definition at line 102 of file errors.php.

| expectError | ( | $ | expected, |
| $ | message | ||
| ) |
Sets up an expectation of an error. If this is not fulfilled at the end of the test, a failure will occour. If the error does happen, then this will cancel it out and send a pass message.
| SimpleExpectation | $expected | Expected error match. |
| string | $message | Message to display. public |
Definition at line 125 of file errors.php.
| extract | ( | ) |
Pulls the earliest error from the queue.
Definition at line 195 of file errors.php.

| getSeverityAsString | ( | $ | severity | ) | [static] |
Converts an error code into it's string representation.
| $severity | PHP integer error code. |
Definition at line 248 of file errors.php.

| setTestCase | ( | &$ | test | ) |
Sets the currently running test case.
| SimpleTestCase | $test | Test case to send messages to. public |
Definition at line 112 of file errors.php.
| SimpleErrorQueue | ( | ) |
Starts with an empty queue.
Definition at line 94 of file errors.php.

| tally | ( | ) |
Any errors still in the queue are sent to the test case. Any unfulfilled expectations trigger failures. public
Definition at line 154 of file errors.php.

| $_expectation_queue |
Definition at line 87 of file errors.php.
| $_queue |
Definition at line 86 of file errors.php.
| $_test |
Definition at line 88 of file errors.php.
| $_using_expect_style = false |
Definition at line 89 of file errors.php.