public function FormatterHelperTest::testFormatBlock in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Helper/FormatterHelperTest.php \Symfony\Component\Console\Tests\Helper\FormatterHelperTest::testFormatBlock()
File
- vendor/
symfony/ console/ Tests/ Helper/ FormatterHelperTest.php, line 29
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testFormatBlock() {
$formatter = new FormatterHelper();
$this
->assertEquals('<error> Some text to display </error>', $formatter
->formatBlock('Some text to display', 'error'), '::formatBlock() formats a message in a block');
$this
->assertEquals('<error> Some text to display </error>' . "\n" . '<error> foo bar </error>', $formatter
->formatBlock(array(
'Some text to display',
'foo bar',
), 'error'), '::formatBlock() formats a message in a block');
$this
->assertEquals('<error> </error>' . "\n" . '<error> Some text to display </error>' . "\n" . '<error> </error>', $formatter
->formatBlock('Some text to display', 'error', true), '::formatBlock() formats a message in a block');
}