aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-03 10:34:27 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-03 10:34:27 +0200
commitf62c3faf88fbc1c2a484854019d17ff377836717 (patch)
treef45c1bf0f44d6485a129b39764935e202bf624b9 /tests/Wallabag
parent001a7bad66fd1ce2b208abfe89177e72b5e1baa5 (diff)
downloadwallabag-f62c3faf88fbc1c2a484854019d17ff377836717.tar.gz
wallabag-f62c3faf88fbc1c2a484854019d17ff377836717.tar.zst
wallabag-f62c3faf88fbc1c2a484854019d17ff377836717.zip
Update test
If the database isn't found when checking for the connection it means, we can connect to the server. The InstallCommand will create the database later. Also, when checking for the SQLite connection, Doctrine creates the file (so the database). That's why the test is skipped for SQLite.
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/Command/InstallCommandTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
index 089a1c5f..83f5bf24 100644
--- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
+++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
@@ -127,6 +127,12 @@ class InstallCommandTest extends WallabagCoreTestCase
127 127
128 public function testRunInstallCommandWithDatabaseRemoved() 128 public function testRunInstallCommandWithDatabaseRemoved()
129 { 129 {
130 // skipped SQLite check when database is removed because while testing for the connection,
131 // the driver will create the file (so the database) before testing if database exist
132 if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver) {
133 $this->markTestSkipped('SQLite spotted: can\'t test with database removed.');
134 }
135
130 $application = new Application($this->getClient()->getKernel()); 136 $application = new Application($this->getClient()->getKernel());
131 $application->add(new DropDatabaseDoctrineCommand()); 137 $application->add(new DropDatabaseDoctrineCommand());
132 138