Skip to content
Snippets Groups Projects
Commit 05cf1dab authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #2053 from nextcloud/make-sure-we-can-backup-the-command-bus

Make sure the database is not replaced while we make a backup of the …
parents 100cec59 4393e800
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,10 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { ...@@ -128,6 +128,10 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
} }
protected function setUp() { 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 // detect database access
self::$wasDatabaseAllowed = true; self::$wasDatabaseAllowed = true;
if (!$this->IsDatabaseAccessAllowed()) { if (!$this->IsDatabaseAccessAllowed()) {
...@@ -140,10 +144,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { ...@@ -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(); $traits = $this->getTestTraits();
foreach ($traits as $trait) { foreach ($traits as $trait) {
$methodName = 'setUp' . basename(str_replace('\\', '/', $trait)); $methodName = 'setUp' . basename(str_replace('\\', '/', $trait));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment