예제 #1
0
파일: prompt.php 프로젝트: xihewang/atoum
 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());
 }
예제 #2
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);
 }