public function testSetOutputWriter() { $this->if($prompt = new testedClass())->then->object($prompt->setOutputWriter($writer = new atoum\writers\std\out()))->isIdenticalTo($prompt)->object($prompt->getOutputWriter())->isIdenticalTo($writer)->object($prompt->setOutputWriter())->isIdenticalTo($prompt)->object($prompt->getOutputWriter())->isNotIdenticalTo($writer)->isEqualTo(new atoum\writers\std\out()); }
public function testSetPrompt() { $this->if($script = new mock\script(uniqid()))->then->object($script->setPrompt($prompt = new prompt()))->isIdenticalTo($script)->object($script->getPrompt())->isIdenticalTo($prompt)->object($prompt->getOutputWriter())->isIdenticalTo($script->getOutputWriter())->given($defaultPrompt = new prompt(), $defaultPrompt->setOutputWriter($script->getOutputWriter()))->then->object($script->setPrompt())->isIdenticalTo($script)->object($script->getPrompt())->isNotIdenticalTo($prompt)->isEqualTo($defaultPrompt); }