]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
Merge remote-tracking branch 'origin/master' into 2.1
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Command / InstallCommandTest.php
index 2413d735485811761d3bb49536dcbac9be9346eb..c0133af4ab6cb7260dade5ca34f03dc9dacf5352 100644 (file)
@@ -28,16 +28,32 @@ class InstallCommandTest extends WallabagCoreTestCase
              *
              * http://stackoverflow.com/a/14374832/569101
              */
-            $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.');
+            $this->markTestSkipped('PostgreSQL spotted: can\'t find a good way to drop current database, skipping.');
         }
     }
 
+    /**
+     * Ensure next tests will have a clean database
+     */
     public static function tearDownAfterClass()
     {
         $application = new Application(static::$kernel);
         $application->setAutoExit(false);
 
-        $code = $application->run(new ArrayInput([
+        $application->run(new ArrayInput([
+            'command' => 'doctrine:schema:drop',
+            '--no-interaction' => true,
+            '--force' => true,
+            '--env' => 'test',
+        ]), new NullOutput());
+
+        $application->run(new ArrayInput([
+            'command' => 'doctrine:schema:create',
+            '--no-interaction' => true,
+            '--env' => 'test',
+        ]), new NullOutput());
+
+        $application->run(new ArrayInput([
             'command' => 'doctrine:fixtures:load',
             '--no-interaction' => true,
             '--env' => 'test',