stub = new ConsoleOutputStub(); } /** * Test that stub can be used as an instance of ConsoleOutput * * @return void */ public function testCanActAsConsoleOutput() { $this->assertInstanceOf("ConsoleOutput", $this->stub); } /** * Test write method * * @return void */ public function testWrite() { $this->stub->write(array("foo", "bar", "baz")); $this->assertEquals(array("foo", "bar", "baz"), $this->stub->messages()); } /** * Test overwrite method * * @return void */ public function testOverwrite() { $this->stub->write(array("foo", "bar", "baz")); $this->stub->overwrite("bat"); $this->assertEquals(array("foo", "bar", "baz", "", "bat"), $this->stub->messages()); } }