aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-03-22 10:29:36 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-22 10:29:36 +0100
commit3ecdf743bb655d77f223b026841356e8fec603a4 (patch)
treef50c74728c85bf4210f10060dc83dfd3f15119da /tests
parentb1b2378758a5e855143286a9126b4b92b81a3afc (diff)
downloadnextcloud-server-3ecdf743bb655d77f223b026841356e8fec603a4.tar.gz
nextcloud-server-3ecdf743bb655d77f223b026841356e8fec603a4.zip
Properly inject EventDispatched in BackgroundRepair
Else it will just be null when called Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Migration/BackgroundRepairTest.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php
index 180ce72d315..df81fd45772 100644
--- a/tests/lib/Migration/BackgroundRepairTest.php
+++ b/tests/lib/Migration/BackgroundRepairTest.php
@@ -77,12 +77,11 @@ class BackgroundRepairTest extends TestCase {
$this->logger = $this->getMockBuilder(ILogger::class)
->disableOriginalConstructor()
->getMock();
+ $this->dispatcher = $this->createMock(EventDispatcherInterface::class);
$this->job = $this->getMockBuilder(BackgroundRepair::class)
+ ->setConstructorArgs([$this->dispatcher])
->setMethods(['loadApp'])
->getMock();
-
- $this->dispatcher = $this->createMock(EventDispatcherInterface::class);
- $this->job->setDispatcher($this->dispatcher);
}
public function testNoArguments() {