[Console] Fix tests on windows

This commit is contained in:
Jordi Boggiano 2013-04-25 13:56:40 +02:00
parent 7d0b30d579
commit 7b83b7221a
3 changed files with 4 additions and 4 deletions

View File

@ -44,6 +44,6 @@ list Lists commands
EOF; EOF;
$this->assertEquals(str_replace("\n", PHP_EOL, $output), $commandTester->getDisplay()); $this->assertEquals($output, $commandTester->getDisplay(true));
} }
} }

View File

@ -54,7 +54,7 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
$command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp()));
} }
$this->assertEquals(trim($expectedDescription), trim($descriptor->describe($application))); $this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $descriptor->describe($application))));
} }
public function getDescribeInputArgumentTestData() public function getDescribeInputArgumentTestData()

View File

@ -176,13 +176,13 @@ TABLE
protected function getOutputStream() protected function getOutputStream()
{ {
return new StreamOutput($this->stream); return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false);
} }
protected function getOutputContent(StreamOutput $output) protected function getOutputContent(StreamOutput $output)
{ {
rewind($output->getStream()); rewind($output->getStream());
return stream_get_contents($output->getStream()); return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream()));
} }
} }