forked from extern/egroupware
Add writable check for filesystem:// shares
This commit is contained in:
parent
127be25c38
commit
33396193ce
@ -170,6 +170,26 @@ class SharingTest extends LoggedInTest
|
|||||||
$this->checkOneFile('/filesystem_test.txt', Sharing::READONLY);
|
$this->checkOneFile('/filesystem_test.txt', Sharing::READONLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test for a readonly share of a path from the filesystem
|
||||||
|
*/
|
||||||
|
public function testFilesystemWritable()
|
||||||
|
{
|
||||||
|
// Don't add to files list or it deletes the folder from filesystem
|
||||||
|
$dir = '/filesystem/';
|
||||||
|
|
||||||
|
// Mount filesystem directory
|
||||||
|
if(Vfs::is_dir($dir)) Vfs::remove($dir);
|
||||||
|
$this->mountFilesystem($dir);
|
||||||
|
$this->assertTrue(Vfs::is_writable($dir), "Unable to write to '$dir' as expected");
|
||||||
|
|
||||||
|
$this->checkDirectory($dir, Sharing::WRITABLE);
|
||||||
|
|
||||||
|
// Test folder in filesystem already has this file in it
|
||||||
|
// It should be picked up normally, but an explicit check can't hurt
|
||||||
|
$this->checkOneFile('/filesystem_test.txt', Sharing::WRITABLE);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check a given directory to see that a link to it works.
|
* Check a given directory to see that a link to it works.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user