Fix more tests
This commit is contained in:
parent
d9063b6141
commit
94b0315d7a
|
@ -51,15 +51,15 @@ class ApplicationTest extends TestCase {
|
||||||
public function testContactsManagerSetup() {
|
public function testContactsManagerSetup() {
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
$c = $app->getContainer();
|
$c = $app->getContainer();
|
||||||
$c->registerService('CardDavBackend', function($c) {
|
$c->registerService(CardDavBackend::class, function() {
|
||||||
$service = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock();
|
$service = $this->createMock(CardDavBackend::class);
|
||||||
$service->method('getAddressBooksForUser')->willReturn([]);
|
$service->method('getAddressBooksForUser')->willReturn([]);
|
||||||
return $service;
|
return $service;
|
||||||
});
|
});
|
||||||
|
|
||||||
// assert setupContactsProvider() is proper
|
// assert setupContactsProvider() is proper
|
||||||
/** @var IManager | \PHPUnit_Framework_MockObject_MockObject $cm */
|
/** @var IManager|\PHPUnit_Framework_MockObject_MockObject $cm */
|
||||||
$cm = $this->getMockBuilder('OCP\Contacts\IManager')->disableOriginalConstructor()->getMock();
|
$cm = $this->createMock(IManager::class);
|
||||||
$app->setupContactsProvider($cm, 'xxx');
|
$app->setupContactsProvider($cm, 'xxx');
|
||||||
$this->assertTrue(true);
|
$this->assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue