diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-11 21:55:20 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-11-16 16:19:42 +0300 |
commit | 53e73dc46fc72290cd6687f6c31384fa5346470c (patch) | |
tree | 1d536144d4590c57cdeae266293f2b1599fd58bf /tests | |
parent | bd431e2e5988a5d33c8f883c06f1988b0e98c1d8 (diff) |
Fix typo in variable name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 258 |
1 files changed, 129 insertions, 129 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 464709645f2..248c687230b 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -874,9 +874,9 @@ class ManagerTest extends \Test\TestCase { ['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; })); @@ -895,9 +895,9 @@ class ManagerTest extends \Test\TestCase { $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; })); @@ -907,9 +907,9 @@ class ManagerTest extends \Test\TestCase { } 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; })); @@ -937,9 +937,9 @@ class ManagerTest extends \Test\TestCase { ['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; })); @@ -955,9 +955,9 @@ class ManagerTest extends \Test\TestCase { $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')); }); @@ -982,9 +982,9 @@ class ManagerTest extends \Test\TestCase { $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!'; }); @@ -2606,16 +2606,16 @@ class ManagerTest extends \Test\TestCase { ->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' => \OCP\Share::SHARE_TYPE_USER, @@ -2663,13 +2663,13 @@ class ManagerTest extends \Test\TestCase { ->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); } @@ -2725,18 +2725,18 @@ class ManagerTest extends \Test\TestCase { ->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', @@ -2744,9 +2744,9 @@ class ManagerTest extends \Test\TestCase { '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); @@ -2806,17 +2806,17 @@ class ManagerTest extends \Test\TestCase { $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); } @@ -2875,13 +2875,13 @@ class ManagerTest extends \Test\TestCase { ->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', @@ -2889,9 +2889,9 @@ class ManagerTest extends \Test\TestCase { '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); } @@ -2953,13 +2953,13 @@ class ManagerTest extends \Test\TestCase { ->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', @@ -2967,9 +2967,9 @@ class ManagerTest extends \Test\TestCase { '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); } @@ -3036,13 +3036,13 @@ class ManagerTest extends \Test\TestCase { ->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', @@ -3050,9 +3050,9 @@ class ManagerTest extends \Test\TestCase { '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); } @@ -3113,17 +3113,17 @@ class ManagerTest extends \Test\TestCase { $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); } @@ -3185,17 +3185,17 @@ class ManagerTest extends \Test\TestCase { $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); } @@ -3257,17 +3257,17 @@ class ManagerTest extends \Test\TestCase { $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); } @@ -3334,17 +3334,17 @@ class ManagerTest extends \Test\TestCase { $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); } @@ -3410,17 +3410,17 @@ class ManagerTest extends \Test\TestCase { $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); } @@ -3484,17 +3484,17 @@ class ManagerTest extends \Test\TestCase { $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); } |