public function testIfReadmeFileIsCorrect() { $input = new ArrayInput(array('readme')); $output = new BufferedOutput(); $app = new Application(); $app->get('readme')->run($input, $output); $fileContent = file_get_contents(__DIR__ . '/../../../README.rst'); $this->assertSame($output->fetch(), $fileContent, 'README.rst file is not up to date! Do not modify it manually! Regenerate readme with command: `php php-cs-fixer readme > README.rst`.'); }
public function testIfReadmeFileIsCorrect() { if (!class_exists('Symfony\\Component\\Console\\Output\\BufferedOutput')) { $this->markTestSkipped('Unsupported symfony/console version, Symfony\\Component\\Console\\Output\\BufferedOutput was added in 2.4.'); } $input = new ArrayInput(array('readme')); $output = new BufferedOutput(); $app = new Application(); $app->get('readme')->run($input, $output); $fileContent = file_get_contents(__DIR__ . '/../README.rst'); $this->assertSame($output->fetch(), $fileContent, 'README.rst file is not up to date! Do not modify it manually! Regenerate readme with command: `php php-cs-fixer readme > README.rst`.'); }