mageekguy\atoum\tests\units\scripts\runner::testSetErrorWriter PHP Method

testSetErrorWriter() public method

public testSetErrorWriter ( )
    public function testSetErrorWriter()
    {
        $this->given($runner = new testedClass(uniqid()))->then->object($runner->setErrorWriter($errorWriter = new atoum\writers\std\err()))->isIdenticalTo($runner)->object($runner->getErrorWriter())->isIdenticalTo($errorWriter)->given($colorizer = new cli\colorizer('0;31'), $colorizer->setPattern('/^([^:]+:)/'), $defaultErrorWriter = new atoum\writers\std\err(), $defaultErrorWriter->addDecorator(new writer\decorators\trim())->addDecorator(new writer\decorators\prompt($runner->getLocale()->_('Error: ')))->addDecorator(new writer\decorators\eol())->addDecorator(new atoum\cli\clear())->addDecorator($colorizer))->then->object($runner->setErrorWriter())->isIdenticalTo($runner)->object($runner->getErrorWriter())->isEqualTo($defaultErrorWriter);
    }