diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-06-24 17:53:37 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-06-27 14:05:27 +0200 |
commit | 630e4b1b463c773e4a23556672fbd90af6176cab (patch) | |
tree | 08139374a319fc18b60c6557e0fbfe84dcb46bfc /tests | |
parent | db6361ef0314868edc9d58a81c0806c8c758af0a (diff) | |
download | nextcloud-server-630e4b1b463c773e4a23556672fbd90af6176cab.tar.gz nextcloud-server-630e4b1b463c773e4a23556672fbd90af6176cab.zip |
check password for link shares
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 4d4fcf1db73..9f543e51592 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -37,6 +37,7 @@ use OCP\Security\ISecureRandom; use OCP\Security\IHasher; use OCP\Files\Mount\IMountManager; use OCP\IGroupManager; +use Symfony\Component\EventDispatcher\EventDispatcher; /** * Class ManagerTest @@ -70,9 +71,11 @@ class ManagerTest extends \Test\TestCase { protected $userManager; /** @var IRootFolder | \PHPUnit_Framework_MockObject_MockObject */ protected $rootFolder; + /** @var EventDispatcher | \PHPUnit_Framework_MockObject_MockObject */ + protected $eventDispatcher; public function setUp() { - + $this->logger = $this->getMock('\OCP\ILogger'); $this->config = $this->getMock('\OCP\IConfig'); $this->secureRandom = $this->getMock('\OCP\Security\ISecureRandom'); @@ -81,6 +84,7 @@ class ManagerTest extends \Test\TestCase { $this->groupManager = $this->getMock('\OCP\IGroupManager'); $this->userManager = $this->getMock('\OCP\IUserManager'); $this->rootFolder = $this->getMock('\OCP\Files\IRootFolder'); + $this->eventDispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcher'); $this->l = $this->getMock('\OCP\IL10N'); $this->l->method('t') @@ -100,7 +104,8 @@ class ManagerTest extends \Test\TestCase { $this->l, $this->factory, $this->userManager, - $this->rootFolder + $this->rootFolder, + $this->eventDispatcher ); $this->defaultProvider = $this->getMockBuilder('\OC\Share20\DefaultShareProvider') @@ -127,7 +132,8 @@ class ManagerTest extends \Test\TestCase { $this->l, $this->factory, $this->userManager, - $this->rootFolder + $this->rootFolder, + $this->eventDispatcher ]); } @@ -146,7 +152,7 @@ class ManagerTest extends \Test\TestCase { $group = $this->getMock('\OCP\IGroup'); $group->method('getGID')->willReturn('sharedWithGroup'); - + return [ [\OCP\Share::SHARE_TYPE_USER, 'sharedWithUser'], [\OCP\Share::SHARE_TYPE_GROUP, 'sharedWithGroup'], @@ -2022,7 +2028,8 @@ class ManagerTest extends \Test\TestCase { $this->l, $factory, $this->userManager, - $this->rootFolder + $this->rootFolder, + $this->eventDispatcher ); $share = $this->getMock('\OCP\Share\IShare'); @@ -2054,7 +2061,8 @@ class ManagerTest extends \Test\TestCase { $this->l, $factory, $this->userManager, - $this->rootFolder + $this->rootFolder, + $this->eventDispatcher ); $share = $this->getMock('\OCP\Share\IShare'); |