rewind($output->
getStream());
$this->
assertEquals(\PHP_EOL.'foo'.\PHP_EOL."\x1b[1A\x1b[0J\x1b[1A\x1b[0J".'bar'.\PHP_EOL.\PHP_EOL,
stream_get_contents($output->
getStream()));
} public function testOverwrite() { $sections =
[];
$output =
new ConsoleSectionOutput($this->stream,
$sections, OutputInterface::VERBOSITY_NORMAL, true,
new OutputFormatter());
$output->
writeln('Foo'
);
$output->
overwrite('Bar'
);
rewind($output->
getStream());
$this->
assertEquals('Foo'.\PHP_EOL."\x1b[1A\x1b[0JBar".\PHP_EOL,
stream_get_contents($output->
getStream()));
} public function testMaxHeight() { $expected = '';
$sections =
[];
$output =
new ConsoleSectionOutput($this->stream,
$sections, OutputInterface::VERBOSITY_NORMAL, true,
new OutputFormatter());
$output->
setMaxHeight(3
);