diff options
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | 38 |
2 files changed, 19 insertions, 21 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 771b3c5a..e97ba46a 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -193,7 +193,7 @@ class InstallCommand extends ContainerAwareCommand | |||
193 | $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); | 193 | $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); |
194 | 194 | ||
195 | $questionHelper = $this->getHelperSet()->get('question'); | 195 | $questionHelper = $this->getHelperSet()->get('question'); |
196 | $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (y/N)', true); | 196 | $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); |
197 | 197 | ||
198 | if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) { | 198 | if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) { |
199 | return $this; | 199 | return $this; |
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index a79d7b90..bb8fb888 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | |||
@@ -14,6 +14,24 @@ use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | |||
14 | 14 | ||
15 | class InstallCommandTest extends WallabagCoreTestCase | 15 | class InstallCommandTest extends WallabagCoreTestCase |
16 | { | 16 | { |
17 | public function setUp() | ||
18 | { | ||
19 | parent::setUp(); | ||
20 | |||
21 | if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver) { | ||
22 | /* | ||
23 | * LOG: statement: CREATE DATABASE "wallabag" | ||
24 | * ERROR: source database "template1" is being accessed by other users | ||
25 | * DETAIL: There is 1 other session using the database. | ||
26 | * STATEMENT: CREATE DATABASE "wallabag" | ||
27 | * FATAL: database "wallabag" does not exist | ||
28 | * | ||
29 | * http://stackoverflow.com/a/14374832/569101 | ||
30 | */ | ||
31 | $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.'); | ||
32 | } | ||
33 | } | ||
34 | |||
17 | public static function tearDownAfterClass() | 35 | public static function tearDownAfterClass() |
18 | { | 36 | { |
19 | $application = new Application(static::$kernel); | 37 | $application = new Application(static::$kernel); |
@@ -91,19 +109,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
91 | 109 | ||
92 | public function testRunInstallCommandWithDatabaseRemoved() | 110 | public function testRunInstallCommandWithDatabaseRemoved() |
93 | { | 111 | { |
94 | if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver) { | ||
95 | /* | ||
96 | * LOG: statement: CREATE DATABASE "wallabag" | ||
97 | * ERROR: source database "template1" is being accessed by other users | ||
98 | * DETAIL: There is 1 other session using the database. | ||
99 | * STATEMENT: CREATE DATABASE "wallabag" | ||
100 | * FATAL: database "wallabag" does not exist | ||
101 | * | ||
102 | * http://stackoverflow.com/a/14374832/569101 | ||
103 | */ | ||
104 | $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.'); | ||
105 | } | ||
106 | |||
107 | $application = new Application($this->getClient()->getKernel()); | 112 | $application = new Application($this->getClient()->getKernel()); |
108 | $application->add(new DropDatabaseDoctrineCommand()); | 113 | $application->add(new DropDatabaseDoctrineCommand()); |
109 | 114 | ||
@@ -184,13 +189,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
184 | 189 | ||
185 | public function testRunInstallCommandChooseNothing() | 190 | public function testRunInstallCommandChooseNothing() |
186 | { | 191 | { |
187 | if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver) { | ||
188 | /* | ||
189 | * @see testRunInstallCommandWithDatabaseRemoved | ||
190 | */ | ||
191 | $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.'); | ||
192 | } | ||
193 | |||
194 | $application = new Application($this->getClient()->getKernel()); | 192 | $application = new Application($this->getClient()->getKernel()); |
195 | $application->add(new InstallCommand()); | 193 | $application->add(new InstallCommand()); |
196 | $application->add(new DropDatabaseDoctrineCommand()); | 194 | $application->add(new DropDatabaseDoctrineCommand()); |