Minor - test lib description update

skala
Yannick Warnier 15 years ago
parent b9b782d8f2
commit db63f56500
  1. 2
      tests/main/inc/lib/classmanager.lib.test.php
  2. 20
      tests/main/inc/lib/export.lib.inc.test.php
  3. 5
      tests/main/inc/lib/legal.lib.test.php
  4. 4
      tests/main/inc/lib/mail.lib.inc.test.php
  5. 4
      tests/main/inc/lib/message.lib.test.php
  6. 6
      tests/main/inc/lib/online.inc.test.php
  7. 4
      tests/main/inc/lib/security.lib.test.php
  8. 75
      tests/main/inc/lib/social.lib.test.php
  9. 3
      tests/main/inc/lib/sortabletable.class.test.php
  10. 4
      tests/main/inc/lib/specific_fields_manager.lib.test.php
  11. 12
      tests/main/inc/lib/stats.lib.inc.test.php
  12. 4
      tests/main/inc/lib/statsUtils.lib.inc.test.php
  13. 7
      tests/main/inc/lib/tablesort.lib.test.php
  14. 6
      tests/main/inc/lib/urlmanager.lib.test.php

@ -3,7 +3,7 @@ require_once(api_get_path(LIBRARY_PATH).'classmanager.lib.php');
class TestClassManager extends UnitTestCase {
public function TestClassManager(){
public function __construct(){
$this->UnitTestCase('Class (students) manager library - main/inc/lib/classmanager.lib.test.php');
}
function testAddUser() {

@ -4,16 +4,16 @@ require_once(api_get_path(LIBRARY_PATH).'document.lib.php');
/** Test about export csv using class document manager
* @author Arthur portugal
* To can test and show the var_dump is necesary comment inside the class
* DocumentManager in the file document.lib.php the word "exit()", because
* To can test and show the var_dump is necesary comment inside the class
* DocumentManager in the file document.lib.php the word "exit()", because
* "exit" not permit show the result.
*/
class TestExport extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Export library tests');
$this->UnitTestCase('Export library - main/inc/lib/export.lib.inc.test.php');
}
/**
* Checks the export_table_csv method.
* @todo check that a new file is created in api_get_path(SYS_ARCHIVE_PATH)
@ -26,7 +26,7 @@ class TestExport extends UnitTestCase {
$this->assertFalse($res);
ob_end_clean();
}
function testExportTableXls() {
$data = array();
@ -49,7 +49,7 @@ class TestExport extends UnitTestCase {
$this->assertFalse($res);
ob_end_clean();
}
function testExportComplexTableXml() {
$data = array();
$filename = 'export';
@ -70,7 +70,7 @@ class TestExport extends UnitTestCase {
$this->assertTrue(is_string($res));
ob_end_clean();
}
function testBackupDatabase() {
$link='';
$db_name='';
@ -96,9 +96,9 @@ class TestExport extends UnitTestCase {
}*/
function testmakeTheBackup() {
global $error_msg, $error_no, $db, $archiveRepositorySys,
global $error_msg, $error_no, $db, $archiveRepositorySys,
$archiveRepositoryWeb, $appendCourse, $appendMainDb, $archiveName,
$_configuration, $_course, $TABLEUSER, $TABLECOURSUSER,
$_configuration, $_course, $TABLEUSER, $TABLECOURSUSER,
$TABLECOURS, $TABLEANNOUNCEMENT;
$exportedCourseId='';
$res=makeTheBackup($exportedCourseId);

@ -3,9 +3,8 @@ require_once(api_get_path(LIBRARY_PATH).'legal.lib.php');
class TestLegal extends UnitTestCase{
public function TestLegal(){
$this->UnitTestCase('');
public function __construct() {
$this->UnitTestCase('Legal terms library - main/inc/lib/legal.lib.test.php');
}
public function testAdd(){

@ -3,6 +3,10 @@ require_once(api_get_path(LIBRARY_PATH).'mail.lib.inc.php');
class TestMail extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Mailing library - main/inc/lib/mail.lib.inc.test.php');
}
function testApiMail() {
ob_start();
$recipient_name='';

@ -3,6 +3,10 @@ require_once(api_get_path(LIBRARY_PATH).'message.lib.php');
class TestMessage extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Messages library - main/inc/lib/message.lib.test.php');
}
function testGetNumberOfMessagesMask() {
$res=get_number_of_messages_mask();
$this->assertTrue(is_string($res));

@ -6,6 +6,10 @@ require_once(api_get_path(LIBRARY_PATH).'online.inc.php');
class TestOnline extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Online (chat) library - main/inc/lib/online.inc.test.php');
}
function testchatcall() {
global $_user, $_cid;
$webpath=api_get_path(WEB_CODE_PATH);
@ -93,7 +97,7 @@ class TestOnline extends UnitTestCase {
$valid='';
$res=who_is_online($valid);
$this->assertTrue(is_array($res));
//var_dump($res);
//var_dump($res);
}
}
?>

@ -6,6 +6,10 @@ class TestSecurity extends UnitTestCase {
public $clean = array();
public function __construct() {
$this->UnitTestCase('Security library - main/inc/lib/security.lib.test.php');
}
function testcheck_abs_path() {
$abs_path='';
$checker_path='';

@ -4,13 +4,12 @@ require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'main_api.lib.php');
class TestSocial extends UnitTestCase{
/*
public $social;
public function TestSocial(){
$this->UnitTestCase('All main social function tests');
}
//public $social;
public function __construct() {
$this->UnitTestCase('Social network library - main/inc/lib/social.lib.test.php');
}
/*
public function setUp(){
$this->social = new SocialManager();
}
@ -19,31 +18,7 @@ class TestSocial extends UnitTestCase{
$this->social = null;
}
*/
//@todo this function was moved to usermanager
/**
* this function has been eliminated of this file, this functionality has been implemented in other file
*/
/* DEPRECATED
public function testRegisterFriend(){
$friend_id=4;
$my_user_id=1;
$relation_type=2;
$res= SocialManager::register_friend ($friend_id,$my_user_id,$relation_type);
$this->assertTrue(is_null($res));
$this->assertNull($res);
//var_dump($res);
}
//Remove or deprecate
public function testRemovedFriend(){
$friend_id=4;
$res = SocialManager::removed_friend($friend_id);
$this->assertTrue(is_null($res));
//var_dump($res);
}
*/
public function testShowListTypeFriends(){
$res =SocialManager::show_list_type_friends();
$this->assertTrue($res);
@ -58,7 +33,7 @@ class TestSocial extends UnitTestCase{
{
$this->assertNull($res);
$this->assertTrue(is_null($res));
} else
} else
{
$this->assertTrue(is_numeric($res));
$this->assertTrue($res);
@ -74,27 +49,14 @@ class TestSocial extends UnitTestCase{
$this->assertFalse($res);
$this->assertTrue(is_numeric($res));
} else
{
{
$this->assertTrue(is_string($res));
$this->assertTrue($res);
}
//var_dump($res);
}
/**
* This function has been DEPRECATED AND REMOVED
*/
/* DEPRECATED
public function testGetListIdFriendsByUserId (){
$user_id = 1;
$id_group=3;
$search_name='group';
$res = SocialManager::get_friends_id($user_id,$id_group,$search_name);
$this->assertTrue(is_array($res));
//var_dump($res);
}
*/
public function testGetListPathWebByUserId(){
$user_id=1;
$id_group=null;
@ -186,22 +148,5 @@ class TestSocial extends UnitTestCase{
}
//var_dump($res);
}
/*
public function TestDeleteCourse(){
$code = 'COURSETEST';
$res = CourseManager::delete_course($code);
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if (strpos($file,$code)!==false) {
if (is_dir($path.'/'.$file)) {
rmdirr($path.'/'.$file);
}
}
}
closedir($handle);
}
}
*/
}
?>
?>

@ -4,6 +4,9 @@ require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
class TestSortableTable extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Sortabletable library - main/inc/lib/sortabletable.class.test.php');
}
function testdisplay() {
$instancia = new SortableTable();

@ -3,6 +3,10 @@ require_once(api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php');
class TestSpecificFieldsManager extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Specific (extra) fields library - main/inc/lib/specific_fields_manager.lib.test.php');
}
function testadd_specific_field() {
$name='';
$res=add_specific_field($name);

@ -2,6 +2,10 @@
require_once(api_get_path(LIBRARY_PATH).'stats.lib.inc.php');
class TestStats extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('System stats library - main/inc/lib/stats.lib.test.php');
}
function testaddBrowser() {
$browser='';
$browsers_array=array();
@ -51,8 +55,8 @@ class TestStats extends UnitTestCase {
function testdecodeOpenInfos() { // 3 excepciones
//ob_start();
global $_course, $TABLETRACK_OPEN, $_configuration;
$TABLETRACK_OPEN = $_configuration['statistics_database']."`.`track_e_open";
global $_course, $TABLETRACK_OPEN, $_configuration;
$TABLETRACK_OPEN = $_configuration['statistics_database']."`.`track_e_open";
$ignore = ignore_user_abort();
$res=decodeOpenInfos();
//ob_end_clean();
@ -60,10 +64,10 @@ class TestStats extends UnitTestCase {
$this->assertTrue(is_null($res));
$this->assertTrue(is_numeric($ignore));
//var_dump($res);
}
}
}
function testextractAgent() {
function testextractAgent() {
$user_agent=$_SERVER['HTTP_USER_AGENT'];
$list_browsers=array();
$list_os=array();

@ -4,6 +4,10 @@ require_once(api_get_path(LIBRARY_PATH).'statsUtils.lib.inc.php');
class TestStatsUtils extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('Stats utilities library - main/inc/lib/statsUtil.lib.inc.test.php');
}
function testbuildTab2col() {
$array_of_results=array();
$title1='';

@ -1,15 +1,12 @@
<?php
define('SORT_DATE', 3);
define('SORT_IMAGE',4);
class TestTablesort extends UnitTestCase{
//public $table;
public function TestTablesort(){
$this->UnitTestCase('Tablesort library tests');
public function __construct(){
$this->UnitTestCase('Tablesort library - main/inc/lib/tablesort.lib.test.php');
}
/*
public function setUp(){

@ -3,6 +3,10 @@ require_once(api_get_path(LIBRARY_PATH).'urlmanager.lib.php');
class TestUrlManager extends UnitTestCase {
public function __construct() {
$this->UnitTestCase('URL manager library - main/inc/lib/urlmanager.lib.test.php');
}
function testadd() {
$url='';
$description='';
@ -127,7 +131,7 @@ class TestUrlManager extends UnitTestCase {
}
function testrelation_url_course_exist() {
$course_id = 'COURSETEST';
$course_id = 'COURSETEST';
$url_id=1;
$resu=UrlManager::relation_url_course_exist($course_id, $url_id);
if(!is_numeric($resu)){

Loading…
Cancel
Save