示例#1
0
文件: script.php 项目: xihewang/atoum
 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);
 }
示例#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);
 }