More fixes to the docs
This commit is contained in:
parent
0f1be1b601
commit
5453daab03
|
@ -51,6 +51,7 @@ class SharedMount extends MountPoint implements MoveableMount {
|
||||||
/**
|
/**
|
||||||
* @param string $storage
|
* @param string $storage
|
||||||
* @param string $mountpoint
|
* @param string $mountpoint
|
||||||
|
* @param array|null $arguments
|
||||||
* @param \OCP\Files\Storage\IStorageFactory $loader
|
* @param \OCP\Files\Storage\IStorageFactory $loader
|
||||||
*/
|
*/
|
||||||
public function __construct($storage, $mountpoint, $arguments = null, $loader = null) {
|
public function __construct($storage, $mountpoint, $arguments = null, $loader = null) {
|
||||||
|
@ -64,6 +65,9 @@ class SharedMount extends MountPoint implements MoveableMount {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if the parent folder exists otherwise move the mount point up
|
* check if the parent folder exists otherwise move the mount point up
|
||||||
|
*
|
||||||
|
* @param array $share
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function verifyMountPoint(&$share) {
|
private function verifyMountPoint(&$share) {
|
||||||
|
|
||||||
|
@ -126,6 +130,7 @@ class SharedMount extends MountPoint implements MoveableMount {
|
||||||
*
|
*
|
||||||
* @param string $path the absolute path
|
* @param string $path the absolute path
|
||||||
* @return string e.g. turns '/admin/files/test.txt' into '/test.txt'
|
* @return string e.g. turns '/admin/files/test.txt' into '/test.txt'
|
||||||
|
* @throws \OCA\Files_Sharing\Exceptions\BrokenPath
|
||||||
*/
|
*/
|
||||||
protected function stripUserFilesPath($path) {
|
protected function stripUserFilesPath($path) {
|
||||||
$trimmed = ltrim($path, '/');
|
$trimmed = ltrim($path, '/');
|
||||||
|
@ -188,7 +193,7 @@ class SharedMount extends MountPoint implements MoveableMount {
|
||||||
*/
|
*/
|
||||||
public function removeMount() {
|
public function removeMount() {
|
||||||
$mountManager = \OC\Files\Filesystem::getMountManager();
|
$mountManager = \OC\Files\Filesystem::getMountManager();
|
||||||
/** @var \OC\Files\Storage\Shared */
|
/** @var $storage \OC\Files\Storage\Shared */
|
||||||
$storage = $this->getStorage();
|
$storage = $this->getStorage();
|
||||||
$result = $storage->unshareStorage();
|
$result = $storage->unshareStorage();
|
||||||
$mountManager->removeMount($this->mountPoint);
|
$mountManager->removeMount($this->mountPoint);
|
||||||
|
@ -196,7 +201,12 @@ class SharedMount extends MountPoint implements MoveableMount {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function getShare() {
|
public function getShare() {
|
||||||
return $this->getStorage()->getShare();
|
/** @var $storage \OC\Files\Storage\Shared */
|
||||||
|
$storage = $this->getStorage();
|
||||||
|
return $storage->getShare();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ class ShareesTest extends TestCase {
|
||||||
/**
|
/**
|
||||||
* @param string $uid
|
* @param string $uid
|
||||||
* @param string $displayName
|
* @param string $displayName
|
||||||
|
* @return \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject
|
||||||
*/
|
*/
|
||||||
protected function getUserMock($uid, $displayName) {
|
protected function getUserMock($uid, $displayName) {
|
||||||
$user = $this->getMockBuilder('OCP\IUser')
|
$user = $this->getMockBuilder('OCP\IUser')
|
||||||
|
@ -110,6 +111,7 @@ class ShareesTest extends TestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $gid
|
* @param string $gid
|
||||||
|
* @return \OCP\IGroup|\PHPUnit_Framework_MockObject_MockObject
|
||||||
*/
|
*/
|
||||||
protected function getGroupMock($gid) {
|
protected function getGroupMock($gid) {
|
||||||
$group = $this->getMockBuilder('OCP\IGroup')
|
$group = $this->getMockBuilder('OCP\IGroup')
|
||||||
|
|
|
@ -30,13 +30,13 @@ use OCP\IUserSession;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class GroupsTest extends \Test\TestCase {
|
class GroupsTest extends \Test\TestCase {
|
||||||
/** @var IGroupManager */
|
/** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
protected $groupManager;
|
protected $groupManager;
|
||||||
/** @var IUserSession */
|
/** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
protected $userSession;
|
protected $userSession;
|
||||||
/** @var IRequest */
|
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
protected $request;
|
protected $request;
|
||||||
/** @var \OC\SubAdmin */
|
/** @var \OC\SubAdmin|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
protected $subAdminManager;
|
protected $subAdminManager;
|
||||||
/** @var \OCA\Provisioning_API\Groups */
|
/** @var \OCA\Provisioning_API\Groups */
|
||||||
protected $api;
|
protected $api;
|
||||||
|
@ -60,6 +60,7 @@ class GroupsTest extends \Test\TestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $gid
|
* @param string $gid
|
||||||
|
* @return \OCP\IGroup|\PHPUnit_Framework_MockObject_MockObject
|
||||||
*/
|
*/
|
||||||
private function createGroup($gid) {
|
private function createGroup($gid) {
|
||||||
$group = $this->getMock('OCP\IGroup');
|
$group = $this->getMock('OCP\IGroup');
|
||||||
|
@ -71,6 +72,7 @@ class GroupsTest extends \Test\TestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $uid
|
* @param string $uid
|
||||||
|
* @return \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject
|
||||||
*/
|
*/
|
||||||
private function createUser($uid) {
|
private function createUser($uid) {
|
||||||
$user = $this->getMock('OCP\IUser');
|
$user = $this->getMock('OCP\IUser');
|
||||||
|
|
Loading…
Reference in New Issue