X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommandTest.php;h=089a1c5fee9a36a2ec6d093d66373581648859d8;hb=6dfac457d80d2f56ee3a69a5ab69ee64389e9e64;hp=6c6ce0873ff40ee73f85146243e7ccbd6603c673;hpb=e49c62fac85ad2a2aa23023094fe81713a5a19c0;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php index 6c6ce087..089a1c5f 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',