setErrorWriter() public method

public setErrorWriter ( mageekguy\atoum\writer $writer = null )
$writer mageekguy\atoum\writer
Beispiel #1
0
 public function testRun()
 {
     $this->if($locale = new mock\locale())->and($this->calling($locale)->_ = function ($string) {
         return $string;
     })->and($helpWriter = new mock\writers\std\out())->and($this->calling($helpWriter)->write = function () {
     })->and($errorWriter = new mock\writers\std\err())->and($this->calling($errorWriter)->clear = $errorWriter)->and($this->calling($errorWriter)->write = $errorWriter)->and($runner = new mock\runner())->and($this->calling($runner)->getTestPaths = array())->and($this->calling($runner)->getDeclaredTestClasses = array())->and($this->calling($runner)->run = function () {
     })->and($script = new testedClass($name = uniqid()))->and($script->setLocale($locale))->and($script->setHelpWriter($helpWriter))->and($script->setErrorWriter($errorWriter))->and($script->setRunner($runner))->then->object($script->run())->isIdenticalTo($script)->mock($locale)->call('_')->withArguments('No test found')->once()->mock($errorWriter)->call('write')->withArguments('No test found')->once();
 }