@@ -2055,7 +2055,7 @@ public function testCreateShareLinkPassword() {
20552055 $ this ->callback (function (\OCP \Share \IShare $ share ) use ($ path ) {
20562056 return $ share ->getNode () === $ path &&
20572057 $ share ->getShareType () === IShare::TYPE_LINK &&
2058- $ share ->getPermissions () === \OCP \Constants::PERMISSION_READ &&
2058+ $ share ->getPermissions () === \OCP \Constants::PERMISSION_ALL &&
20592059 $ share ->getSharedBy () === 'currentUser ' &&
20602060 $ share ->getPassword () === 'password ' &&
20612061 $ share ->getExpirationDate () === null ;
@@ -2095,7 +2095,7 @@ public function testCreateShareLinkSendPasswordByTalk() {
20952095 $ this ->callback (function (\OCP \Share \IShare $ share ) use ($ path ) {
20962096 return $ share ->getNode () === $ path &&
20972097 $ share ->getShareType () === IShare::TYPE_LINK &&
2098- $ share ->getPermissions () === \OCP \Constants::PERMISSION_READ &&
2098+ $ share ->getPermissions () === \OCP \Constants::PERMISSION_ALL &&
20992099 $ share ->getSharedBy () === 'currentUser ' &&
21002100 $ share ->getPassword () === 'password ' &&
21012101 $ share ->getSendPasswordByTalk () === true &&
@@ -2179,15 +2179,15 @@ public function testCreateShareValidExpireDate() {
21792179
21802180 return $ share ->getNode () === $ path &&
21812181 $ share ->getShareType () === IShare::TYPE_LINK &&
2182- $ share ->getPermissions () === \OCP \Constants::PERMISSION_READ &&
2182+ $ share ->getPermissions () === \OCP \Constants::PERMISSION_READ | \ OCP \Constants:: PERMISSION_SHARE &&
21832183 $ share ->getSharedBy () === 'currentUser ' &&
21842184 $ share ->getPassword () === null &&
21852185 $ share ->getExpirationDate () == $ date ;
21862186 })
21872187 )->willReturnArgument (0 );
21882188
21892189 $ expected = new DataResponse ([]);
2190- $ result = $ ocs ->createShare ('valid-path ' , \ OCP \Constants:: PERMISSION_ALL , IShare::TYPE_LINK , null , 'false ' , '' , null , '2000-01-01 ' );
2190+ $ result = $ ocs ->createShare ('valid-path ' , null , IShare::TYPE_LINK , null , 'false ' , '' , null , '2000-01-01 ' );
21912191
21922192 $ this ->assertInstanceOf (get_class ($ expected ), $ result );
21932193 $ this ->assertEquals ($ expected ->getData (), $ result ->getData ());
0 commit comments