diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-20 14:28:17 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-20 14:28:17 +0200 |
commit | 94b0315d7aee7efce13fa1bcc34acf36a724fef9 (patch) | |
tree | 860105c349f424a0d1952fb3ae6e938795a94a73 /apps | |
parent | d9063b6141bd4c1c6754ac749427b8bc2711d2f6 (diff) | |
download | nextcloud-server-94b0315d7aee7efce13fa1bcc34acf36a724fef9.tar.gz nextcloud-server-94b0315d7aee7efce13fa1bcc34acf36a724fef9.zip |
Fix more tests
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/tests/unit/AppInfo/ApplicationTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/tests/unit/AppInfo/ApplicationTest.php b/apps/dav/tests/unit/AppInfo/ApplicationTest.php index 8656ce93519..bb6cfe67b4d 100644 --- a/apps/dav/tests/unit/AppInfo/ApplicationTest.php +++ b/apps/dav/tests/unit/AppInfo/ApplicationTest.php @@ -51,15 +51,15 @@ class ApplicationTest extends TestCase { public function testContactsManagerSetup() { $app = new Application(); $c = $app->getContainer(); - $c->registerService('CardDavBackend', function($c) { - $service = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock(); + $c->registerService(CardDavBackend::class, function() { + $service = $this->createMock(CardDavBackend::class); $service->method('getAddressBooksForUser')->willReturn([]); return $service; }); // assert setupContactsProvider() is proper - /** @var IManager | \PHPUnit_Framework_MockObject_MockObject $cm */ - $cm = $this->getMockBuilder('OCP\Contacts\IManager')->disableOriginalConstructor()->getMock(); + /** @var IManager|\PHPUnit_Framework_MockObject_MockObject $cm */ + $cm = $this->createMock(IManager::class); $app->setupContactsProvider($cm, 'xxx'); $this->assertTrue(true); } |