public function test__toString()
{
$this->if($score = new \mock\mageekguy\atoum\score())->and($score->getMockController()->getTotalMemoryUsage = $totalMemoryUsage = rand(0, PHP_INT_MAX))->and($adapter = new atoum\test\adapter())->and($adapter->class_exists = true)->and($testController = new atoum\mock\controller())->and($testController->getTestedClassName = uniqid())->and($test = new \mock\mageekguy\atoum\test($adapter))->and($test->getMockController()->getScore = $score)->and($defaultField = new test\memory\cli())->and($customField = new test\memory\cli())->and($customField->setPrompt($prompt = new prompt(uniqid())))->and($customField->setTitleColorizer($titleColorizer = new colorizer(uniqid(), uniqid())))->and($customField->setMemoryColorizer($memoryColorizer = new colorizer(uniqid(), uniqid())))->and($customField->setLocale($locale = new locale()))->then->castToString($defaultField)->isEqualTo($defaultField->getPrompt() . $defaultField->getLocale()->_('Memory usage: unknown.') . PHP_EOL)->castToString($customField)->isEqualTo($prompt . sprintf($locale->_('%1$s: %2$s.'), $titleColorizer->colorize($locale->_('Memory usage')), $memoryColorizer->colorize($locale->_('unknown'))) . PHP_EOL)->if($defaultField->handleEvent(atoum\test::runStart, $test))->then->castToString($defaultField)->isEqualTo($defaultField->getPrompt() . $defaultField->getLocale()->_('Memory usage: unknown.') . PHP_EOL)->if($customField->handleEvent(atoum\test::runStart, $test))->then->castToString($customField)->isEqualTo($prompt . sprintf($locale->_('%1$s: %2$s.'), $titleColorizer->colorize($locale->_('Memory usage')), $memoryColorizer->colorize($locale->_('unknown'))) . PHP_EOL)->if($defaultField->handleEvent(atoum\test::runStop, $test))->then->castToString($defaultField)->isEqualTo($defaultField->getPrompt() . sprintf($defaultField->getLocale()->_('Memory usage: %4.2f Mb.'), $totalMemoryUsage / 1048576) . PHP_EOL)->if($customField->handleEvent(atoum\test::runStop, $test))->then->castToString($customField)->isEqualTo($prompt . sprintf($locale->_('%1$s: %2$s.'), $titleColorizer->colorize($locale->_('Memory usage')), $memoryColorizer->colorize(sprintf($locale->_('%4.2f Mb'), $totalMemoryUsage / 1048576))) . PHP_EOL);
}