mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Fix VFS Share tests
This commit is contained in:
parent
7915bfd5b2
commit
bacccbc42a
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api\Vfs;
|
namespace EGroupware\Api\Vfs;
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../LoggedInTest.php';
|
||||||
|
|
||||||
use EGroupware\Api;
|
use EGroupware\Api;
|
||||||
use EGroupware\Api\Vfs;
|
use EGroupware\Api\Vfs;
|
||||||
use EGroupware\Api\LoggedInTest as LoggedInTest;
|
use EGroupware\Api\LoggedInTest as LoggedInTest;
|
||||||
@ -500,7 +502,7 @@ class SharingBase extends LoggedInTest
|
|||||||
$this->assertTrue(Vfs::is_readable('/'), 'Could not read root (/) from link');
|
$this->assertTrue(Vfs::is_readable('/'), 'Could not read root (/) from link');
|
||||||
|
|
||||||
// Check other paths
|
// Check other paths
|
||||||
$this->assertFalse(Vfs::is_readable($path));
|
$this->assertFalse(Vfs::is_readable($path), "Was able to read $path as anoymous, it should be mounted as /");
|
||||||
$this->assertFalse(Vfs::is_readable($path . '../'));
|
$this->assertFalse(Vfs::is_readable($path . '../'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,6 +543,7 @@ class SharingBase extends LoggedInTest
|
|||||||
echo $form."\n\n";
|
echo $form."\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->assertNotNull($form, "Didn't find filemanager interface");
|
||||||
$data = json_decode($form->getAttribute('data-etemplate'));
|
$data = json_decode($form->getAttribute('data-etemplate'));
|
||||||
|
|
||||||
$this->assertEquals('filemanager.index', $data->name);
|
$this->assertEquals('filemanager.index', $data->name);
|
||||||
@ -583,7 +586,9 @@ class SharingBase extends LoggedInTest
|
|||||||
* Use this class for sharing so we can make sure we get a session ID, even
|
* Use this class for sharing so we can make sure we get a session ID, even
|
||||||
* though we're on the command line
|
* though we're on the command line
|
||||||
*/
|
*/
|
||||||
class TestSharing extends Api\Sharing {
|
if(!class_exists('TestSharing'))
|
||||||
|
{
|
||||||
|
class TestSharing extends Api\Vfs\Sharing {
|
||||||
|
|
||||||
public static function create_new_session()
|
public static function create_new_session()
|
||||||
{
|
{
|
||||||
@ -596,4 +601,10 @@ class TestSharing extends Api\Sharing {
|
|||||||
}
|
}
|
||||||
return $sessionid;
|
return $sessionid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function get_share_class($share)
|
||||||
|
{
|
||||||
|
return __CLASS__;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -32,8 +32,7 @@ class SharingTest extends SharingBase
|
|||||||
public function testHomeReadonly()
|
public function testHomeReadonly()
|
||||||
{
|
{
|
||||||
$dir = Vfs::get_home_dir().'/';
|
$dir = Vfs::get_home_dir().'/';
|
||||||
error_log(__METHOD__ . " Dir: $dir");
|
|
||||||
error_log(array2string($GLOBALS['egw_info']['server']));
|
|
||||||
$this->checkDirectory($dir, Sharing::READONLY);
|
$this->checkDirectory($dir, Sharing::READONLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user