mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-23 21:51:57 +01:00
Always run other commands
This commit is contained in:
parent
463b86c143
commit
ef4964cf48
@ -35,7 +35,6 @@ class InstallCommand extends Command
|
|||||||
'curl_exec',
|
'curl_exec',
|
||||||
'curl_multi_init',
|
'curl_multi_init',
|
||||||
];
|
];
|
||||||
private bool $runOtherCommands = true;
|
|
||||||
|
|
||||||
private EntityManagerInterface $entityManager;
|
private EntityManagerInterface $entityManager;
|
||||||
private EventDispatcherInterface $dispatcher;
|
private EventDispatcherInterface $dispatcher;
|
||||||
@ -56,11 +55,6 @@ class InstallCommand extends Command
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function disableRunOtherCommands(): void
|
|
||||||
{
|
|
||||||
$this->runOtherCommands = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
@ -342,10 +336,6 @@ class InstallCommand extends Command
|
|||||||
*/
|
*/
|
||||||
private function runCommand($command, $parameters = [])
|
private function runCommand($command, $parameters = [])
|
||||||
{
|
{
|
||||||
if (!$this->runOtherCommands) {
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
$parameters = array_merge(
|
$parameters = array_merge(
|
||||||
['command' => $command],
|
['command' => $command],
|
||||||
$parameters,
|
$parameters,
|
||||||
|
@ -4,7 +4,6 @@ namespace Tests\Wallabag\Command;
|
|||||||
|
|
||||||
use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver;
|
use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver;
|
||||||
use Doctrine\DBAL\Connection;
|
use Doctrine\DBAL\Connection;
|
||||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
|
||||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
@ -77,11 +76,6 @@ class InstallCommandTest extends WallabagTestCase
|
|||||||
{
|
{
|
||||||
$command = $this->getCommand();
|
$command = $this->getCommand();
|
||||||
|
|
||||||
// enable calling other commands for MySQL only because rollback isn't supported
|
|
||||||
if (!$this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
|
||||||
$command->disableRunOtherCommands();
|
|
||||||
}
|
|
||||||
|
|
||||||
$tester = new CommandTester($command);
|
$tester = new CommandTester($command);
|
||||||
$tester->setInputs([
|
$tester->setInputs([
|
||||||
'y', // dropping database
|
'y', // dropping database
|
||||||
@ -101,7 +95,6 @@ class InstallCommandTest extends WallabagTestCase
|
|||||||
public function testRunInstallCommandWithReset()
|
public function testRunInstallCommandWithReset()
|
||||||
{
|
{
|
||||||
$command = $this->getCommand();
|
$command = $this->getCommand();
|
||||||
$command->disableRunOtherCommands();
|
|
||||||
|
|
||||||
$tester = new CommandTester($command);
|
$tester = new CommandTester($command);
|
||||||
$tester->setInputs([
|
$tester->setInputs([
|
||||||
@ -170,7 +163,6 @@ class InstallCommandTest extends WallabagTestCase
|
|||||||
public function testRunInstallCommandChooseResetSchema()
|
public function testRunInstallCommandChooseResetSchema()
|
||||||
{
|
{
|
||||||
$command = $this->getCommand();
|
$command = $this->getCommand();
|
||||||
$command->disableRunOtherCommands();
|
|
||||||
|
|
||||||
$tester = new CommandTester($command);
|
$tester = new CommandTester($command);
|
||||||
$tester->setInputs([
|
$tester->setInputs([
|
||||||
@ -223,7 +215,6 @@ class InstallCommandTest extends WallabagTestCase
|
|||||||
public function testRunInstallCommandNoInteraction()
|
public function testRunInstallCommandNoInteraction()
|
||||||
{
|
{
|
||||||
$command = $this->getCommand();
|
$command = $this->getCommand();
|
||||||
$command->disableRunOtherCommands();
|
|
||||||
|
|
||||||
$tester = new CommandTester($command);
|
$tester = new CommandTester($command);
|
||||||
$tester->execute([], [
|
$tester->execute([], [
|
||||||
|
Loading…
Reference in New Issue
Block a user