Fix typo in variable name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
bd431e2e59
commit
53e73dc46f
|
@ -874,9 +874,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
['core', 'shareapi_expire_after_n_days', '7', '3'],
|
['core', 'shareapi_expire_after_n_days', '7', '3'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($future) {
|
$hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($future) {
|
||||||
return $data['expirationDate'] == $future;
|
return $data['expirationDate'] == $future;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -895,9 +895,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$share = $this->manager->newShare();
|
$share = $this->manager->newShare();
|
||||||
$share->setExpirationDate($date);
|
$share->setExpirationDate($date);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
|
$hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
|
||||||
return $data['expirationDate'] == $expected && $data['passwordSet'] === false;
|
return $data['expirationDate'] == $expected && $data['passwordSet'] === false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -907,9 +907,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidateExpirationDateNoDateNoDefault() {
|
public function testValidateExpirationDateNoDateNoDefault() {
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) {
|
$hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) {
|
||||||
return $data['expirationDate'] === null && $data['passwordSet'] === true;
|
return $data['expirationDate'] === null && $data['passwordSet'] === true;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -937,9 +937,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
['core', 'shareapi_expire_after_n_days', '7', '3'],
|
['core', 'shareapi_expire_after_n_days', '7', '3'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
|
$hookListener->expects($this->once())->method('listener')->with($this->callback(function ($data) use ($expected) {
|
||||||
return $data['expirationDate'] == $expected;
|
return $data['expirationDate'] == $expected;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -955,9 +955,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
$save = clone $nextWeek;
|
$save = clone $nextWeek;
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
|
$hookListener->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
|
||||||
$data['expirationDate']->sub(new \DateInterval('P2D'));
|
$data['expirationDate']->sub(new \DateInterval('P2D'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -982,9 +982,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$share = $this->manager->newShare();
|
$share = $this->manager->newShare();
|
||||||
$share->setExpirationDate($nextWeek);
|
$share->setExpirationDate($nextWeek);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
|
$hookListener->expects($this->once())->method('listener')->willReturnCallback(function ($data) {
|
||||||
$data['accepted'] = false;
|
$data['accepted'] = false;
|
||||||
$data['message'] = 'Invalid date!';
|
$data['message'] = 'Invalid date!';
|
||||||
});
|
});
|
||||||
|
@ -2606,16 +2606,16 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->with($share)
|
->with($share)
|
||||||
->willReturn($share);
|
->willReturn($share);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$this->rootFolder->method('getUserFolder')->with('newUser')->willReturnSelf();
|
$this->rootFolder->method('getUserFolder')->with('newUser')->willReturnSelf();
|
||||||
$this->rootFolder->method('getRelativePath')->with('/newUser/files/myPath')->willReturn('/myPath');
|
$this->rootFolder->method('getRelativePath')->with('/newUser/files/myPath')->willReturn('/myPath');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->once())->method('post')->with([
|
$hookListener2->expects($this->once())->method('post')->with([
|
||||||
'itemType' => 'file',
|
'itemType' => 'file',
|
||||||
'itemSource' => 100,
|
'itemSource' => 100,
|
||||||
'shareType' => \OCP\Share::SHARE_TYPE_USER,
|
'shareType' => \OCP\Share::SHARE_TYPE_USER,
|
||||||
|
@ -2663,13 +2663,13 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->with($share)
|
->with($share)
|
||||||
->willReturn($share);
|
->willReturn($share);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -2725,18 +2725,18 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->with($share)
|
->with($share)
|
||||||
->willReturn($share);
|
->willReturn($share);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->once())->method('post')->with([
|
$hookListener->expects($this->once())->method('post')->with([
|
||||||
'itemType' => 'file',
|
'itemType' => 'file',
|
||||||
'itemSource' => 100,
|
'itemSource' => 100,
|
||||||
'date' => $tomorrow,
|
'date' => $tomorrow,
|
||||||
'uidOwner' => 'owner',
|
'uidOwner' => 'owner',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->once())->method('post')->with([
|
$hookListener2->expects($this->once())->method('post')->with([
|
||||||
'itemType' => 'file',
|
'itemType' => 'file',
|
||||||
'itemSource' => 100,
|
'itemSource' => 100,
|
||||||
'uidOwner' => 'owner',
|
'uidOwner' => 'owner',
|
||||||
|
@ -2744,9 +2744,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
|
@ -2806,17 +2806,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -2875,13 +2875,13 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->with($share, 'password')
|
->with($share, 'password')
|
||||||
->willReturn($share);
|
->willReturn($share);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->once())->method('post')->with([
|
$hookListener2->expects($this->once())->method('post')->with([
|
||||||
'itemType' => 'file',
|
'itemType' => 'file',
|
||||||
'itemSource' => 100,
|
'itemSource' => 100,
|
||||||
'uidOwner' => 'owner',
|
'uidOwner' => 'owner',
|
||||||
|
@ -2889,9 +2889,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -2953,13 +2953,13 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->with($share, 'password')
|
->with($share, 'password')
|
||||||
->willReturn($share);
|
->willReturn($share);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->once())->method('post')->with([
|
$hookListener2->expects($this->once())->method('post')->with([
|
||||||
'itemType' => 'file',
|
'itemType' => 'file',
|
||||||
'itemSource' => 100,
|
'itemSource' => 100,
|
||||||
'uidOwner' => 'owner',
|
'uidOwner' => 'owner',
|
||||||
|
@ -2967,9 +2967,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3036,13 +3036,13 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->with($share, 'password')
|
->with($share, 'password')
|
||||||
->willReturn($share);
|
->willReturn($share);
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->once())->method('post')->with([
|
$hookListener2->expects($this->once())->method('post')->with([
|
||||||
'itemType' => 'file',
|
'itemType' => 'file',
|
||||||
'itemSource' => 100,
|
'itemSource' => 100,
|
||||||
'uidOwner' => 'owner',
|
'uidOwner' => 'owner',
|
||||||
|
@ -3050,9 +3050,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3113,17 +3113,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3185,17 +3185,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3257,17 +3257,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3334,17 +3334,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3410,17 +3410,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
@ -3484,17 +3484,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->defaultProvider->expects($this->never())
|
$this->defaultProvider->expects($this->never())
|
||||||
->method('update');
|
->method('update');
|
||||||
|
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListener, 'post');
|
||||||
$hookListner->expects($this->never())->method('post');
|
$hookListener->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListner2, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_password', $hookListener2, 'post');
|
||||||
$hookListner2->expects($this->never())->method('post');
|
$hookListener2->expects($this->never())->method('post');
|
||||||
|
|
||||||
$hookListner3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
$hookListener3 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
|
||||||
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner3, 'post');
|
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
|
||||||
$hookListner3->expects($this->never())->method('post');
|
$hookListener3->expects($this->never())->method('post');
|
||||||
|
|
||||||
$manager->updateShare($share);
|
$manager->updateShare($share);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue