mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Isolated tests
Use https://github.com/dmaicher/doctrine-test-bundle to have test isolation.
This commit is contained in:
parent
4423b88c5b
commit
7ab5eb9508
24 changed files with 468 additions and 287 deletions
|
@ -499,20 +499,18 @@ class InstallCommand extends ContainerAwareCommand
|
|||
$output = new BufferedOutput();
|
||||
$exitCode = $this->getApplication()->run(new ArrayInput($parameters), $output);
|
||||
|
||||
if (0 !== $exitCode) {
|
||||
$this->getApplication()->setAutoExit(true);
|
||||
|
||||
$this->defaultOutput->writeln('');
|
||||
$this->defaultOutput->writeln('<error>The command "'.$command.'" generates some errors: </error>');
|
||||
$this->defaultOutput->writeln($output->fetch());
|
||||
|
||||
die();
|
||||
}
|
||||
|
||||
// PDO does not always close the connection after Doctrine commands.
|
||||
// See https://github.com/symfony/symfony/issues/11750.
|
||||
$this->getContainer()->get('doctrine')->getManager()->getConnection()->close();
|
||||
|
||||
if (0 !== $exitCode) {
|
||||
$this->getApplication()->setAutoExit(true);
|
||||
|
||||
throw new \RuntimeException(
|
||||
'The command "'.$command."\" generates some errors: \n\n"
|
||||
.$output->fetch());
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue