aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/CoreBundle/Command/InstallCommandTest.php')
-rw-r--r--tests/Wallabag/CoreBundle/Command/InstallCommandTest.php18
1 files changed, 13 insertions, 5 deletions
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;
18 18
19class InstallCommandTest extends WallabagCoreTestCase 19class InstallCommandTest extends WallabagCoreTestCase
20{ 20{
21 public static function setUpBeforeClass()
22 {
23 // disable doctrine-test-bundle
24 StaticDriver::setKeepStaticConnections(false);
25 }
26
27 public static function tearDownAfterClass()
28 {
29 // enable doctrine-test-bundle
30 StaticDriver::setKeepStaticConnections(true);
31 }
32
21 public function setUp() 33 public function setUp()
22 { 34 {
23 parent::setUp(); 35 parent::setUp();
@@ -51,9 +63,6 @@ class InstallCommandTest extends WallabagCoreTestCase
51 parent::setUp(); 63 parent::setUp();
52 } 64 }
53 65
54 // disable doctrine-test-bundle
55 StaticDriver::setKeepStaticConnections(false);
56
57 $this->resetDatabase($this->getClient()); 66 $this->resetDatabase($this->getClient());
58 } 67 }
59 68
@@ -62,6 +71,7 @@ class InstallCommandTest extends WallabagCoreTestCase
62 $databasePath = getenv('TEST_DATABASE_PATH'); 71 $databasePath = getenv('TEST_DATABASE_PATH');
63 // Remove variable environnement 72 // Remove variable environnement
64 putenv('TEST_DATABASE_PATH'); 73 putenv('TEST_DATABASE_PATH');
74
65 if ($databasePath && file_exists($databasePath)) { 75 if ($databasePath && file_exists($databasePath)) {
66 unlink($databasePath); 76 unlink($databasePath);
67 } else { 77 } else {
@@ -71,8 +81,6 @@ class InstallCommandTest extends WallabagCoreTestCase
71 $this->resetDatabase($client); 81 $this->resetDatabase($client);
72 } 82 }
73 83
74 // enable doctrine-test-bundle
75 StaticDriver::setKeepStaticConnections(true);
76 parent::tearDown(); 84 parent::tearDown();
77 } 85 }
78 86