8000 [Console] Fix time display in tests by alexandre-daubois · Pull Request #59158 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
< 10000 /details>
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ public function testAnsiColorsAndEmojis()
$this->assertEquals(
" \033[44;37m Starting the demo... fingers crossed \033[0m\n".
' 0/15 '.$progress.str_repeat($empty, 26)." 0%\n".
" \xf0\x9f\x8f\x81 < 1 sec \033[44;37m 0 B \033[0m",
" \xf0\x9f\x8f\x81 < 1 ms \033[44;37m 0 B \033[0m",
stream_get_contents($output->getStream())
);
ftruncate($output->getStream(), 0);
Expand All @@ -972,7 +972,7 @@ public function testAnsiColorsAndEmojis()
$this->generateOutput(
" \033[44;37m Looks good to me... \033[0m\n".
' 4/15 '.str_repeat($done, 7).$progress.str_repeat($empty, 19)." 26%\n".
" \xf0\x9f\x8f\x81 < 1 sec \033[41;37m 97 KiB \033[0m"
" \xf0\x9f\x8f\x81 < 1 ms \033[41;37m 97 KiB \033[0m"
),
stream_get_contents($output->getStream())
);
Expand All @@ -987,7 +987,7 @@ public function testAnsiColorsAndEmojis()
$this->generateOutput(
" \033[44;37m Thanks, bye \033[0m\n".
' 15/15 '.str_repeat($done, 28)." 100%\n".
" \xf0\x9f\x8f\x81 < 1 sec \033[41;37m 195 KiB \033[0m"
" \xf0\x9f\x8f\x81 < 1 ms \033[41;37m 195 KiB \033[0m"
),
stream_get_contents($output->getStream())
);
Expand Down Expand Up @@ -1022,7 +1022,7 @@ public function testSetFormatWithTimes()
$bar->start();
rewind($output->getStream());
$this->assertEquals(
' 0/15 [>---------------------------] 0% < 1 sec/< 1 sec/< 1 sec',
' 0/15 [>---------------------------] 0% < 1 ms/< 1 ms/< 1 ms',
stream_get_contents($output->getStream())
);
}
Expand Down Expand Up @@ -1111,7 +1111,7 @@ public function testEmptyInputWithDebugFormat()

rewind($output->getStream());
$this->assertEquals(
' 0/0 [============================] 100% < 1 sec/< 1 sec',
' 0/0 [============================] 100% < 1 ms/< 1 ms',
stream_get_contents($output->getStream())
);
}
Expand Down
Loading
0