['core', 'shareapi_expire_after_n_days', '7', '3'],
]);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
- \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
- $hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($future) {
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
+ \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
+ $hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($future) {
return $data['expirationDate'] == $future;
}));
$share = $this->manager->newShare();
$share->setExpirationDate($date);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
- \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
- $hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
+ \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
+ $hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
return $data['expirationDate'] == $expected && $data['passwordSet'] === false;
}));
}
public function testValidateExpirationDateNoDateNoDefault() {
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
- \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
- $hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) {
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
+ \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
+ $hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) {
return $data['expirationDate'] === null && $data['passwordSet'] === true;
}));
['core', 'shareapi_expire_after_n_days', '7', '3'],
]);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
- \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
- $hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
+ \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
+ $hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
return $data['expirationDate'] == $expected;
}));
$save = clone $nextWeek;
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
- \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
- $hookListner->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
+ \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
+ $hookListener->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
$data['expirationDate']->sub(new \DateInterval('P2D'));
});
$share = $this->manager->newShare();
$share->setExpirationDate($nextWeek);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
- \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
- $hookListner->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
+ \OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
+ $hookListener->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
$data['accepted'] = false;
$data['message'] = 'Invalid date!';
});
->with($share)
->willReturn($share);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
$this->rootFolder->method('getUserFolder')->with('newUser')->willReturnSelf();
$this->rootFolder->method('getRelativePath')->with('/newUser/files/myPath')->willReturn('/myPath');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner2, 'post');
- $hookListner2->expects($this->once())->method('post')->with([
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener2, 'post');
+ $hookListener2->expects($this->once())->method('post')->with([
'itemType' => 'file',
'itemSource' => 100,
'shareType' => IShare::TYPE_USER,
->with($share)
->willReturn($share);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
$manager->updateShare($share);
}
->with($share)
->willReturn($share);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->once())->method('post')->with([
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->once())->method('post')->with([
'itemType' => 'file',
'itemSource' => 100,
'date' => $tomorrow,
'uidOwner' => 'owner',
]);
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->once())->method('post')->with([
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->once())->method('post')->with([
'itemType' => 'file',
'itemSource' => 100,
'uidOwner' => 'owner',
'disabled' => false,
]);
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
->with($share, 'password')
->willReturn($share);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->once())->method('post')->with([
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->once())->method('post')->with([
'itemType' => 'file',
'itemSource' => 100,
'uidOwner' => 'owner',
'disabled' => false,
]);
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
->with($share, 'password')
->willReturn($share);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->once())->method('post')->with([
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->once())->method('post')->with([
'itemType' => 'file',
'itemSource' => 100,
'uidOwner' => 'owner',
'disabled' => false,
]);
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
->with($share, 'password')
->willReturn($share);
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->once())->method('post')->with([
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->once())->method('post')->with([
'itemType' => 'file',
'itemSource' => 100,
'uidOwner' => 'owner',
'disabled' => false,
]);
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}
$this->defaultProvider->expects($this->never())
->method('update');
- $hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
- $hookListner->expects($this->never())->method('post');
+ $hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
+ $hookListener->expects($this->never())->method('post');
- $hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
- $hookListner2->expects($this->never())->method('post');
+ $hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
+ $hookListener2->expects($this->never())->method('post');
- $hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
- $hookListner3->expects($this->never())->method('post');
+ $hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
+ \OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
+ $hookListener3->expects($this->never())->method('post');
$manager->updateShare($share);
}