diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-08 16:32:41 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-08 16:32:41 +0100 |
commit | 4393e8003b12c756704455053d436b4d5db22557 (patch) | |
tree | f0b57ec6c72208887972fb5dd20e1e4d8a111905 /tests/lib/TestCase.php | |
parent | c591e29eb356ad2f5a0b7363fda7f08baff58e13 (diff) | |
download | nextcloud-server-4393e8003b12c756704455053d436b4d5db22557.tar.gz nextcloud-server-4393e8003b12c756704455053d436b4d5db22557.zip |
Make sure the database is not replaced while we make a backup of the service
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/TestCase.php')
-rw-r--r-- | tests/lib/TestCase.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index 61372d4ae90..c1fe9c382fa 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -128,6 +128,10 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { } protected function setUp() { + // overwrite the command bus with one we can run ourselves + $this->commandBus = new QueueBus(); + $this->overwriteService('AsyncCommandBus', $this->commandBus); + // detect database access self::$wasDatabaseAllowed = true; if (!$this->IsDatabaseAccessAllowed()) { @@ -140,10 +144,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { }); } - // overwrite the command bus with one we can run ourselves - $this->commandBus = new QueueBus(); - $this->overwriteService('AsyncCommandBus', $this->commandBus); - $traits = $this->getTestTraits(); foreach ($traits as $trait) { $methodName = 'setUp' . basename(str_replace('\\', '/', $trait)); |