$this->testCase = $testCase;
}
-
// --- Making protected functions visible for test
public function output( $out, $channel = null ) {
return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
}
-
// --- Requirements for getting instance of abstract class
public function execute() {
}
}
+/**
+ * @covers Maintenance
+ */
class MaintenanceTest extends MediaWikiTestCase {
-
/**
* The main Maintenance instance that is used for testing.
*
*/
private $m;
-
protected function setUp() {
parent::setUp();
$this->m = new MaintenanceFixup( $this );
parent::tearDown();
}
-
/**
* asserts the output before and after simulating shutdown
*
* This function simulates shutdown of self::m.
*
- * @param $preShutdownOutput string: expected output before simulating shutdown
- * @param $expectNLAppending bool: Whether or not shutdown simulation is expected
- * to add a newline to the output. If false, $preShutdownOutput is the
- * expected output after shutdown simulation. Otherwise,
- * $preShutdownOutput with an appended newline is the expected output
- * after shutdown simulation.
+ * @param string $preShutdownOutput Expected output before simulating shutdown
+ * @param bool $expectNLAppending Whether or not shutdown simulation is expected
+ * to add a newline to the output. If false, $preShutdownOutput is the
+ * expected output after shutdown simulation. Otherwise,
+ * $preShutdownOutput with an appended newline is the expected output
+ * after shutdown simulation.
*/
private function assertOutputPrePostShutdown( $preShutdownOutput, $expectNLAppending ) {
$this->expectOutputString( $postShutdownOutput );
}
-
// Although the following tests do not seem to be too consistent (compare for
// example the newlines within the test.*StringString tests, or the
// test.*Intermittent.* tests), the objective of these tests is not to describe