mageekguy\atoum\tests\units\report\fields\test\event\tap::test__toStringWithRuntimeException PHP Method

test__toStringWithRuntimeException() public method

    public function test__toStringWithRuntimeException()
    {
        $this->mockGenerator->shunt('__construct')->if($score = new \mock\atoum\test\score())->and($test = new \mock\mageekguy\atoum\test())->and($this->calling($test)->getScore = $score)->and($this->calling($test)->getClass = $class = uniqid())->and($this->calling($test)->getCurrentMethod = $method = uniqid())->and($this->calling($score)->getLastRuntimeException = new exceptions\runtime())->and($field = new testedClass())->then->castToString($field)->isEmpty()->if($field->handleEvent(atoum\runner::runStart, $test))->then->castToString($field)->isEmpty()->if($field->handleEvent(atoum\test::runtimeException, $test))->then->castToString($field)->isEqualTo('Bail out!' . PHP_EOL)->if($this->calling($score)->getLastRuntimeException = new exceptions\runtime($message = uniqid()))->and($field->handleEvent(atoum\test::runtimeException, $test))->then->castToString($field)->isEqualTo('Bail out! ' . $message . PHP_EOL);
    }