Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public function testSetOutputWriter()
 {
     $this->if($script = new mock\script($name = uniqid()))->then->object($script->setOutputWriter($outputWriter = new atoum\writers\std\out()))->isIdenticalTo($script)->object($script->getOutputWriter())->isIdenticalTo($outputWriter);
 }