From 3ecdf743bb655d77f223b026841356e8fec603a4 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 22 Mar 2019 10:29:36 +0100 Subject: Properly inject EventDispatched in BackgroundRepair Else it will just be null when called Signed-off-by: Roeland Jago Douma --- tests/lib/Migration/BackgroundRepairTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') 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() { -- cgit v1.2.3