executeDumpCommand($jsonOptions + [ '--area' => 'test', ]); $this->assertEquals( json_encode($this->getOpenApiDefinition('test'), $expectedJsonFlags)."\n", $output ); } public function provideJsonMode() { return [ 'pretty print' => [[], JSON_PRETTY_PRINT], 'one line' => [['--no-pretty'], 0], ]; } private function executeDumpCommand(array $options) { $kernel = static::bootKernel(); $application = new Application($kernel); $command = $application->find('nelmio:apidoc:dump'); $commandTester = new CommandTester($command); $commandTester->execute($options); return $commandTester->getDisplay(); } }