X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommandTest.php;fp=tests%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommandTest.php;h=d8928451121aa045b6dba6b22a3e7643852ebd34;hb=39502b4748709948658fd236a1883b902c6fd470;hp=bd351b187fd2671480c9a5bc262b600e26c572d7;hpb=b878be4cc99fd4927c70b59386cf7a57b33bb381;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php index bd351b18..d8928451 100644 --- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php @@ -18,6 +18,18 @@ use Wallabag\CoreBundle\Command\InstallCommand; class InstallCommandTest extends WallabagCoreTestCase { + public static function setUpBeforeClass() + { + // disable doctrine-test-bundle + StaticDriver::setKeepStaticConnections(false); + } + + public static function tearDownAfterClass() + { + // enable doctrine-test-bundle + StaticDriver::setKeepStaticConnections(true); + } + public function setUp() { parent::setUp(); @@ -51,9 +63,6 @@ class InstallCommandTest extends WallabagCoreTestCase parent::setUp(); } - // disable doctrine-test-bundle - StaticDriver::setKeepStaticConnections(false); - $this->resetDatabase($this->getClient()); } @@ -62,6 +71,7 @@ class InstallCommandTest extends WallabagCoreTestCase $databasePath = getenv('TEST_DATABASE_PATH'); // Remove variable environnement putenv('TEST_DATABASE_PATH'); + if ($databasePath && file_exists($databasePath)) { unlink($databasePath); } else { @@ -71,8 +81,6 @@ class InstallCommandTest extends WallabagCoreTestCase $this->resetDatabase($client); } - // enable doctrine-test-bundle - StaticDriver::setKeepStaticConnections(true); parent::tearDown(); }