|
|
@@ -990,7 +990,7 @@ class ShareTest extends \Test\TestCase { |
|
|
|
* @param $item |
|
|
|
*/ |
|
|
|
public function testCheckPasswordProtectedShare($expected, $item) { |
|
|
|
\OC::$server->getSession()->set('public_link_authenticated', 100); |
|
|
|
\OC::$server->getSession()->set('public_link_authenticated', '100'); |
|
|
|
$result = \OCP\Share::checkPasswordProtectedShare($item); |
|
|
|
$this->assertEquals($expected, $result); |
|
|
|
} |
|
|
@@ -1002,8 +1002,12 @@ class ShareTest extends \Test\TestCase { |
|
|
|
array(true, array('share_with' => '')), |
|
|
|
array(true, array('share_with' => '1234567890', 'share_type' => '1')), |
|
|
|
array(true, array('share_with' => '1234567890', 'share_type' => 1)), |
|
|
|
array(true, array('share_with' => '1234567890', 'share_type' => '3', 'id' => '100')), |
|
|
|
array(true, array('share_with' => '1234567890', 'share_type' => 3, 'id' => '100')), |
|
|
|
array(true, array('share_with' => '1234567890', 'share_type' => '3', 'id' => 100)), |
|
|
|
array(true, array('share_with' => '1234567890', 'share_type' => 3, 'id' => 100)), |
|
|
|
array(false, array('share_with' => '1234567890', 'share_type' => '3', 'id' => '101')), |
|
|
|
array(false, array('share_with' => '1234567890', 'share_type' => 3, 'id' => '101')), |
|
|
|
array(false, array('share_with' => '1234567890', 'share_type' => '3', 'id' => 101)), |
|
|
|
array(false, array('share_with' => '1234567890', 'share_type' => 3, 'id' => 101)), |
|
|
|
); |