You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Symfony/Tests/Component/Console/Helper/FormatterHelperTest.php
+33-5Lines changed: 33 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,44 @@ public function testFormatSection()
19
19
{
20
20
$formatter = newFormatterHelper();
21
21
22
-
$this->assertEquals('<info>[cli]</info> Some text to display', $formatter->formatSection('cli', 'Some text to display'), '::formatSection() formats a message in a section');
22
+
$this->assertEquals(
23
+
'<info>[cli]</info> Some text to display',
24
+
$formatter->formatSection('cli', 'Some text to display'),
25
+
'::formatSection() formats a message in a section'
26
+
);
23
27
}
24
28
25
29
publicfunctiontestFormatBlock()
26
30
{
27
31
$formatter = newFormatterHelper();
28
32
29
-
$this->assertEquals('<error> Some text to display </error>', $formatter->formatBlock('Some text to display', 'error'), '::formatBlock() formats a message in a block');
30
-
$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');
31
-
32
-
$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');
33
+
$this->assertEquals(
34
+
'<error> Some text to display </error>',
35
+
$formatter->formatBlock('Some text to display', 'error'),
36
+
'::formatBlock() formats a message in a block'
37
+
);
38
+
39
+
$this->assertEquals(
40
+
'<error> Some text to display </error>' . "\n" .
41
+
'<error> foo bar </error>',
42
+
$formatter->formatBlock(array('Some text to display', 'foo bar'), 'error'),
43
+
'::formatBlock() formats a message in a block'
44
+
);
45
+
46
+
$this->assertEquals(
47
+
'<error> </error>' . "\n" .
48
+
'<error> Some text to display </error>' . "\n" .
49
+
'<error> </error>',
50
+
$formatter->formatBlock('Some text to display', 'error', true),
51
+
'::formatBlock() formats a message in a block'
52
+
);
53
+
54
+
$this->assertEquals(
55
+
'<error> </error>' . "\n" .
56
+
'<error> Du texte à afficher </error>' . "\n" .
57
+
'<error> </error>',
58
+
$formatter->formatBlock('Du texte à afficher', 'error', true),
0 commit comments