Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix getMock Migration
  • Loading branch information
rullzer committed Sep 7, 2016
commit 1b5ed67857a2281a4adb060175009e72bf8d49b5
6 changes: 4 additions & 2 deletions tests/lib/Migration/BackgroundRepairTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public function setUp() {
$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() {
Expand Down Expand Up @@ -105,7 +107,7 @@ public function testUnknownStep() {

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']));

Expand Down