X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommandTest.php;h=07ff2772e05d4b7f50255975f3d44f4347c8065f;hb=f1be7af446052c6fed7033664c6c6350f558961b;hp=6c6ce0873ff40ee73f85146243e7ccbd6603c673;hpb=2e16a9033930ea33721f9ffba3fb12d145f5d56b;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php index 6c6ce087..07ff2772 100644 --- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php @@ -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', @@ -71,7 +87,6 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Setting up database.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay()); - $this->assertContains('Installing assets.', $tester->getDisplay()); } public function testRunInstallCommandWithReset() @@ -103,7 +118,6 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay()); - $this->assertContains('Installing assets.', $tester->getDisplay()); // we force to reset everything $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); @@ -148,7 +162,6 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Setting up database.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay()); - $this->assertContains('Installing assets.', $tester->getDisplay()); // the current database doesn't already exist $this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay()); @@ -186,7 +199,6 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Setting up database.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay()); - $this->assertContains('Installing assets.', $tester->getDisplay()); $this->assertContains('Droping schema and creating schema', $tester->getDisplay()); } @@ -241,7 +253,6 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Setting up database.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay()); - $this->assertContains('Installing assets.', $tester->getDisplay()); $this->assertContains('Creating schema', $tester->getDisplay()); } @@ -274,6 +285,5 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Setting up database.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay()); - $this->assertContains('Installing assets.', $tester->getDisplay()); } }