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 …
pull/2054/merge
Morris Jobke 8 years ago committed by GitHub
commit 05cf1dab4c
  1. 8
      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));

Loading…
Cancel
Save