diff --git a/tests/main/inc/lib/document.lib.test.php b/tests/main/inc/lib/document.lib.test.php index 4e894c8265..f9cc19ea63 100755 --- a/tests/main/inc/lib/document.lib.test.php +++ b/tests/main/inc/lib/document.lib.test.php @@ -235,7 +235,7 @@ class TestDocumentManager extends UnitTestCase { if (!headers_sent()) { $res=DocumentManager::string_send_for_download($full_string, $forced, $name); } - $this->assertTrue($res); + $this->assertFalse(empty($res)); } /** diff --git a/tests/main/inc/lib/main_api.lib.test.php b/tests/main/inc/lib/main_api.lib.test.php index fd41d95900..5ead944079 100755 --- a/tests/main/inc/lib/main_api.lib.test.php +++ b/tests/main/inc/lib/main_api.lib.test.php @@ -603,17 +603,14 @@ class TestMainApi extends UnitTestCase { } function testApiChmod_R(){ + // We know, it does not work for Windows. + if (IS_WINDOWS_OS) { return true; } $dirname = api_get_path(SYS_LANG_PATH); $perm_dir = substr(sprintf('%o', fileperms($dirname)), -4); - if ($perm_dir != '0777') { - // haha! This one is too good to remove... (for now) - $msg = "Error"; - $this->assertTrue(is_string($msg)); - } else { - $filemode = '0777'; - $res = api_chmod_R($dirname, $filemode); - $this->assertTrue($res || IS_WINDOWS_OS); // We know, it does not work for Windows. - } + $this->assertEqual($perm_dir,'0777'); + $new_filemode = '0775'; + $res = api_chmod_R($dirname, $new_filemode); + $this->assertTrue($res); } function testApiGetVersion(){ diff --git a/tests/main/inc/lib/usermanager.lib.test.php b/tests/main/inc/lib/usermanager.lib.test.php index 47437dbc4a..2c131ebce9 100755 --- a/tests/main/inc/lib/usermanager.lib.test.php +++ b/tests/main/inc/lib/usermanager.lib.test.php @@ -115,9 +115,9 @@ class TestUserManager extends UnitTestCase { $this->assertTrue(is_bool($res)); } - function testBuildProductionList() { - $res=UserManager::build_production_list(1, false, false); - $this->assertTrue(is_string($res)); + function testBuildProductionListIsFalse() { + $res = UserManager::build_production_list(1, false, false); + $this->assertFalse($res); } function testDeleteApiKey() {