]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix getMock Migration
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 7 Sep 2016 18:18:04 +0000 (20:18 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 7 Sep 2016 18:42:38 +0000 (20:42 +0200)
tests/lib/Migration/BackgroundRepairTest.php

index e092f6c2e8bb372be6912b057b8d4d3920059032..2de55f647e7f64bc57ac456fc7b87ff24d921ff7 100644 (file)
@@ -75,7 +75,9 @@ class BackgroundRepairTest extends TestCase {
                $this->logger = $this->getMockBuilder('OCP\ILogger')
                        ->disableOriginalConstructor()
                        ->getMock();
-               $this->job = $this->getMock('OC\Migration\BackgroundRepair', ['loadApp']);
+               $this->job = $this->getMockBuilder(BackgroundRepair::class)
+                       ->setMethods(['loadApp'])
+                       ->getMock();
        }
 
        public function testNoArguments() {
@@ -105,7 +107,7 @@ class BackgroundRepairTest extends TestCase {
 
        public function testWorkingStep() {
                /** @var EventDispatcher | \PHPUnit_Framework_MockObject_MockObject $dispatcher */
-               $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcher', []);
+               $dispatcher = $this->createMock(EventDispatcher::class);
                $dispatcher->expects($this->once())->method('dispatch')
                        ->with('\OC\Repair::step', new GenericEvent('\OC\Repair::step', ['A test repair step']));