Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-07 21:18:04 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-07 21:42:38 +0300
commit1b5ed67857a2281a4adb060175009e72bf8d49b5 (patch)
tree1ee57c5824759afafd2b69d32a5ff05f0d709fa6 /tests/lib/Migration
parentb8b9fc2b1cc507ea491eb439a5088884cf1279b8 (diff)
Fix getMock Migration
Diffstat (limited to 'tests/lib/Migration')
-rw-r--r--tests/lib/Migration/BackgroundRepairTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php
index e092f6c2e8b..2de55f647e7 100644
--- a/tests/lib/Migration/BackgroundRepairTest.php
+++ b/tests/lib/Migration/BackgroundRepairTest.php
@@ -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']));