|
MediaWiki
REL1_23
|
Mock for the input/output of FetchText. More...


Public Member Functions | |
| getStdin ($len=null) | |
| Return input from stdin. | |
| mockGetInvocations () | |
| Gets invocation counters for mocked methods. | |
| mockStdin ($stdin) | |
| Data for the fake stdin. | |
Private Attributes | |
| Array | $mockInvocations = array( 'getStdin' => 0 ) |
| Invocation counters for the mocked aspects. | |
| bool | $mockSetUp = false |
| Whether or not a text for stdin has been provided. | |
| String null | $mockStdinText = null |
| Text to pass as stdin. | |
Mock for the input/output of FetchText.
FetchText internally tries to access stdin and stdout. We mock those aspects for testing.
Definition at line 11 of file fetchTextTest.php.
| SemiMockedFetchText::getStdin | ( | $ | len = null | ) |
Return input from stdin.
| $len | Integer: the number of bytes to read. If null, just return the handle. Maintenance::STDIN_ALL returns the full length |
Reimplemented from Maintenance.
Definition at line 48 of file fetchTextTest.php.
Gets invocation counters for mocked methods.
Definition at line 41 of file fetchTextTest.php.
| SemiMockedFetchText::mockStdin | ( | $ | stdin | ) |
Data for the fake stdin.
| $stdin | String The string to be used instead of stdin |
Definition at line 30 of file fetchTextTest.php.
Invocation counters for the mocked aspects.
Definition at line 23 of file fetchTextTest.php.
bool SemiMockedFetchText::$mockSetUp = false [private] |
Whether or not a text for stdin has been provided.
Definition at line 19 of file fetchTextTest.php.
String null SemiMockedFetchText::$mockStdinText = null [private] |
Text to pass as stdin.
Definition at line 15 of file fetchTextTest.php.