diff --git a/api/tests/Vfs/SharingBase.php b/api/tests/Vfs/SharingBase.php index daf2c51367..fc1309aa7f 100644 --- a/api/tests/Vfs/SharingBase.php +++ b/api/tests/Vfs/SharingBase.php @@ -14,6 +14,8 @@ namespace EGroupware\Api\Vfs; +require_once __DIR__ . '/../LoggedInTest.php'; + use EGroupware\Api; use EGroupware\Api\Vfs; 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'); // 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 . '../')); } @@ -541,6 +543,7 @@ class SharingBase extends LoggedInTest echo $form."\n\n"; } } + $this->assertNotNull($form, "Didn't find filemanager interface"); $data = json_decode($form->getAttribute('data-etemplate')); $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 * 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() { @@ -596,4 +601,10 @@ class TestSharing extends Api\Sharing { } return $sessionid; } + + public static function get_share_class($share) + { + return __CLASS__; + } +} } \ No newline at end of file diff --git a/api/tests/Vfs/SharingTest.php b/api/tests/Vfs/SharingTest.php index c64353f2b1..ccc0a30019 100644 --- a/api/tests/Vfs/SharingTest.php +++ b/api/tests/Vfs/SharingTest.php @@ -32,8 +32,7 @@ class SharingTest extends SharingBase public function testHomeReadonly() { $dir = Vfs::get_home_dir().'/'; -error_log(__METHOD__ . " Dir: $dir"); -error_log(array2string($GLOBALS['egw_info']['server'])); + $this->checkDirectory($dir, Sharing::READONLY); }