X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fmaintenance%2FMaintenanceTest.php;h=42d1d0bfd7a368d159302f22e0706330bdbb3947;hb=ab2d63b53ed29c44e4917125555af3dc2eb9964e;hp=f4b61afc2a018f61d7977139533b950bb890623b;hpb=b65669ff7adbbde55872a8ddd93214a9e1df75c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/maintenance/MaintenanceTest.php b/tests/phpunit/maintenance/MaintenanceTest.php index f4b61afc2a..42d1d0bfd7 100644 --- a/tests/phpunit/maintenance/MaintenanceTest.php +++ b/tests/phpunit/maintenance/MaintenanceTest.php @@ -43,7 +43,7 @@ class MaintenanceFixup extends Maintenance { private $testCase; /** - * shutdownSimulated === true iff simulateShutdown has done it's work + * shutdownSimulated === true if simulateShutdown has done it's work * * @var bool */ @@ -111,7 +111,6 @@ class MaintenanceFixup extends Maintenance { $this->testCase = $testCase; } - // --- Making protected functions visible for test public function output( $out, $channel = null ) { @@ -122,7 +121,6 @@ class MaintenanceFixup extends Maintenance { return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() ); } - // --- Requirements for getting instance of abstract class public function execute() { @@ -130,9 +128,11 @@ class MaintenanceFixup extends Maintenance { } } +/** + * @covers Maintenance + */ class MaintenanceTest extends MediaWikiTestCase { - /** * The main Maintenance instance that is used for testing. * @@ -140,7 +140,6 @@ class MaintenanceTest extends MediaWikiTestCase { */ private $m; - protected function setUp() { parent::setUp(); $this->m = new MaintenanceFixup( $this ); @@ -154,18 +153,17 @@ class MaintenanceTest extends MediaWikiTestCase { 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 ) { @@ -179,7 +177,6 @@ class MaintenanceTest extends MediaWikiTestCase { $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