return;
}
- return call_user_func_array ( array( "parent", __FUNCTION__ ), func_get_args() );
+ return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
}
/**
* Safety net around register_shutdown_function of Maintenance.php
*/
public function __destruct() {
- if ( ! $this->shutdownSimulated ) {
+ if ( !$this->shutdownSimulated ) {
// Someone generated a MaintenanceFixup instance without calling
// simulateShutdown. We'd have to raise a PHPUnit exception to correctly
// flag this illegal usage. However, we are already in a destruktor, which
- // would trigger undefined behaviour. Hence, we can only report to the
+ // would trigger undefined behavior. Hence, we can only report to the
// error output :( Hopefully people read the PHPUnit output.
$name = $this->testCase->getName();
fwrite( STDERR, "ERROR! Instance of " . __CLASS__ . " for test $name "
}
-
// --- Making protected functions visible for test
public function output( $out, $channel = null ) {
// Maintenance::output signature. However, we do not use (or rely on)
// those variables. Instead we pass to Maintenance::output whatever we
// receive at runtime.
- return call_user_func_array ( array( "parent", __FUNCTION__ ), func_get_args() );
+ return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
}
-
// --- Requirements for getting instance of abstract class
public function execute() {
private function assertOutputPrePostShutdown( $preShutdownOutput, $expectNLAppending ) {
$this->assertEquals( $preShutdownOutput, $this->getActualOutput(),
- "Output before shutdown simulation" );
+ "Output before shutdown simulation" );
$this->m->simulateShutdown();
$this->m = null;
// 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
- // consistent behaviour, but rather currently existing behaviour.
+ // consistent behavior, but rather currently existing behavior.
function testOutputEmpty() {
$m2->output( "bar" );
$this->assertEquals( "foobar", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foobar", false );
}
$m2->output( "bar", null );
$this->assertEquals( "foobar", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foobar", false );
}
$m2->output( "bar", "bazChannel" );
$this->assertEquals( "foobar", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foobar\n", true );
}
$m2->output( "bar\n", null );
$this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foo\nbar\n", false );
}
$m2->output( "bar\n", "bazChannel" );
$this->assertEquals( "foobar", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foobar\n", true );
}
$m2->outputChanneled( "bar" );
$this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foo\nbar\n", false );
}
$m2->outputChanneled( "bar", null );
$this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foo\nbar\n", false );
}
$m2->outputChanneled( "bar", "bazChannel" );
$this->assertEquals( "foobar", $this->getActualOutput(),
- "Output before shutdown simulation (m2)" );
+ "Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foobar\n", true );
}
$m2->outputChanneled( "bar", "bazChannel" );
$this->assertEquals( "foobar", $this->getActualOutput(),
- "Output before first cleanup" );
+ "Output before first cleanup" );
$this->m->cleanupChanneled();
$this->assertEquals( "foobar\n", $this->getActualOutput(),
- "Output after first cleanup" );
+ "Output after first cleanup" );
$m2->cleanupChanneled();
$this->assertEquals( "foobar\n\n", $this->getActualOutput(),
- "Output after second cleanup" );
+ "Output after second cleanup" );
$m2->simulateShutdown();
$this->assertOutputPrePostShutdown( "foobar\n\n", false );