Fixed additional test fails

skala
Yannick Warnier 15 years ago
parent f84276b06e
commit 16017dadd7
  1. 2
      tests/main/inc/lib/document.lib.test.php
  2. 15
      tests/main/inc/lib/main_api.lib.test.php
  3. 6
      tests/main/inc/lib/usermanager.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));
}
/**

@ -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(){

@ -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() {

Loading…
Cancel
Save