change COURSEX by COURSETEST

skala
Juan Carlos Raña 15 years ago
parent 46952d872f
commit 41508c34d7
  1. 8
      tests/main/admin/calendar.lib.test.php
  2. 2
      tests/main/admin/sub_language.class.test.php
  3. 8
      tests/main/chat/chat_functions.lib.test.php
  4. 6
      tests/main/exercice/hotpotatoes.lib.test.php
  5. 6
      tests/main/inc/lib/blog.lib.test.php
  6. 2
      tests/main/inc/lib/document.lib.test.php
  7. 2
      tests/main/inc/lib/fileManage.lib.test.php
  8. 24
      tests/main/inc/lib/groupmanager.lib.test.php
  9. 2
      tests/main/inc/lib/image.lib.test.php
  10. 2
      tests/main/inc/lib/main_api.lib.test.php
  11. 2
      tests/main/inc/lib/social.lib.test.php
  12. 2
      tests/main/inc/lib/urlmanager.lib.test.php
  13. 2
      tests/main/survey/survey.lib.test.php
  14. 2
      tests/test_suite.php

@ -223,20 +223,20 @@ class TestCalendar extends UnitTestCase {
$start = 0;
$end = 0;
$params = array();
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$course_info = api_get_course_info($course_code);
$resul = get_repeated_events_day_view($course_info,$start,$end,$params);
$this->assertTrue(is_array($resul));
}
public function testGetRepeatedEventsWeekView(){
$course_info = 'COURSEX';
$course_info = 'COURSETEST';
$resul = get_repeated_events_week_view($course_info, 0, 0, '');
$this->assertTrue(is_array($resul));
}
public function testGetRepeatedEventsMonthView(){
$course_code='COURSEX';
$course_code='COURSETEST';
$course_info = api_get_course_info($course_code);
$resul= get_repeated_events_month_view($course_info,0,0,'');
$this->assertTrue(is_array($resul));
@ -244,7 +244,7 @@ class TestCalendar extends UnitTestCase {
}
public function testGetRepeatedEventsListView(){
$course_code='COURSEX';
$course_code='COURSETEST';
$course_info = api_get_course_info($course_code);
$resul = get_repeated_events_list_view($course_info,0,0,'');
$this->assertTrue(is_array($resul));

@ -227,7 +227,7 @@ class TestSubLanguageManager extends UnitTestCase {
}
/*
public function TestDeleteCourse(){
$code = 'COURSEX';
$code = 'COURSETEST';
$res = CourseManager::delete_course($code);
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {

@ -15,7 +15,7 @@ class TestChatFunctions extends UnitTestCase {
function testuser_connected_in_chat () {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$user_id=1;
$course_info = api_get_course_info($course_code);
$database_name = $course_info['dbName'];
@ -25,7 +25,7 @@ class TestChatFunctions extends UnitTestCase {
function testUsersListInChat () {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$course_info = api_get_course_info($course_code);
$database_name = $course_info['dbName'];
$res = users_list_in_chat($database_name);
@ -50,7 +50,7 @@ class TestChatFunctions extends UnitTestCase {
function testExitOfChat () {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$course_info = api_get_course_info($course_code);
$database_name = $course_info['dbName'];
$this->CreateChatConnection($database_name);
@ -64,7 +64,7 @@ class TestChatFunctions extends UnitTestCase {
function testDisconnectUserOfChat() {
$_SESSION['is_courseAdmin'] = 1;
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$course_info = api_get_course_info($course_code);
$database_name = $course_info['dbName'];
$this->CreateChatConnection($database_name);

@ -46,7 +46,7 @@ class TestHotpotatoes extends UnitTestCase {
function testGetComment() {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$path = 'exercice_submit.php';
$query ="select comment from $dbTable where path='$path'";
$res=GetComment($path,$course_code);
@ -95,7 +95,7 @@ class TestHotpotatoes extends UnitTestCase {
}
function testGetQuizName() {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$fname='exercice_submit.php';
$fpath='main/exercice/exercice_submit.php';
$res=GetQuizName($fname,$fpath);
@ -172,7 +172,7 @@ class TestHotpotatoes extends UnitTestCase {
}
function testWriteFileCont() {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$full_file_path='/main/exercice/';
$content='test test test';
$res=WriteFileCont($full_file_path,$content);

@ -559,7 +559,7 @@ class TestBlog extends UnitTestCase
public function testGetBlogPostFromUser(){
global $_configuration;
$res = get_blog_post_from_user('chamilo_COURSEX',1);
$res = get_blog_post_from_user('chamilo_COURSETEST',1);
$this->assertFalse($res);
$this->assertTrue(is_string($res));
//var_dump($res);
@ -567,7 +567,7 @@ class TestBlog extends UnitTestCase
public function testGetBlogCommentFromUser(){
global $_configuration;
$course_datos['wanted_code'] = 'chamilo_COURSEX';
$course_datos['wanted_code'] = 'chamilo_COURSETEST';
$user_id = 1;
$res = get_blog_comment_from_user($course_datos['wanted_code'],1);
$this->assertFalse($res);
@ -575,7 +575,7 @@ class TestBlog extends UnitTestCase
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if (strpos($file,'COURSEX')!==false) {
if (strpos($file,'COURSETEST')!==false) {
if (is_dir($path.'/'.$file)) {
rmdirr($path.'/'.$file);
}

@ -98,7 +98,7 @@ class TestDocumentManager extends UnitTestCase {
$tbl_document = Database::get_course_table(TABLE_DOCUMENT);
$this_course= $_course['dbName'].'.';
$dirurl = api_get_path(WEB_COURSE_PATH);
$doc_url= $dirurl.'COURSEX/document/video/painting.mpg?cidReq=COURSEX';
$doc_url= $dirurl.'COURSETEST/document/video/painting.mpg?cidReq=COURSETEST';
$res=DocumentManager::file_visible_to_user($this_course, $doc_url);
$this->assertTrue(is_bool($res));
}

@ -170,7 +170,7 @@ class TestFileManager extends UnitTestCase {
}
public function testListAllFiles(){
$dirArray = array('COURSEX, document, images');
$dirArray = array('COURSETEST, document, images');
$res = $this->fmanager->list_all_files($dirArray);
$this->assertFalse($res);
$this->assertTrue(is_array($res));

@ -104,8 +104,8 @@ class TestGroupManager extends UnitTestCase {
}
public function testGetCategories(){
$course_code ='COURSEX';
$course_db = 'chamilo_COURSEX';
$course_code ='COURSETEST';
$course_db = 'chamilo_COURSETEST';
$res = GroupManager::get_categories($course_code);
$this->assertTrue(is_array($res));
//var_dump($res);
@ -113,7 +113,7 @@ class TestGroupManager extends UnitTestCase {
public function testGetCategory(){
$id =2;
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$res = GroupManager::get_category($id,$course_code);
$this->assertTrue(is_array($res));
$this->assertTrue($res);
@ -121,9 +121,9 @@ class TestGroupManager extends UnitTestCase {
}
public function testGetCategoryFromGroup(){
$course_code='COURSEX';
$course_code='COURSETEST';
$group_id= 1;
$course_db = 'chamilo_COURSEX';
$course_db = 'chamilo_COURSETEST';
$resu = GroupManager::get_category_from_group($group_id,$course_code);
$this->assertTrue(is_bool($resu));
//var_dump($res);
@ -132,8 +132,8 @@ class TestGroupManager extends UnitTestCase {
public function testDeleteCategory(){
$cat_id=1;
$course_code = 'COURSEX';
$course_db = 'chamilo_COURSEX';
$course_code = 'COURSETEST';
$course_db = 'chamilo_COURSETEST';
$res = GroupManager::delete_category($cat_id, $course_code);
$this->assertTrue(is_null($res));
$this->assertNull($res);
@ -192,8 +192,8 @@ class TestGroupManager extends UnitTestCase {
public function testGetCurrenMaxGroupsPerUser(){
$category_id = 2;
$course_code = 'COURSEX';
$course_db= 'chamilo_COURSEX';
$course_code = 'COURSETEST';
$course_db= 'chamilo_COURSETEST';
$res =GroupManager::get_current_max_groups_per_user($category_id = null, $course_code = null);
$this->assertTrue(is_Null($res));
//var_dump($res);
@ -385,7 +385,7 @@ class TestGroupManager extends UnitTestCase {
public function testGetGroupIds(){
global $user_id;
$course_db= 'chamilo_COURSEX';
$course_db= 'chamilo_COURSETEST';
$res = GroupManager::get_group_ids($course_db,$user_id);
$this->assertTrue(is_array($res));
//var_dump($res);
@ -393,7 +393,7 @@ class TestGroupManager extends UnitTestCase {
public function testGetCompleteListOfUsersThatCanBeAddedToGroup(){
global $_course, $_user;
$course_code= 'chamilo_COURSEX';
$course_code= 'chamilo_COURSETEST';
$group_id=2;
$res = GroupManager::get_complete_list_of_users_that_can_be_added_to_group($course_code, $group_id);
$this->assertTrue(is_array($res));
@ -444,7 +444,7 @@ class TestGroupManager extends UnitTestCase {
}
/*
public function TestDeleteCourse(){
$code = 'COURSEX';
$code = 'COURSETEST';
$res = CourseManager::delete_course($code);
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {

@ -94,7 +94,7 @@ class TestImage extends UnitTestCase {
}
/*
public function TestDeleteCourse(){
$code = 'COURSEX';
$code = 'COURSETEST';
$res = CourseManager::delete_course($code);
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {

@ -866,7 +866,7 @@ class TestMainApi extends UnitTestCase {
//var_dump($res);
}
public function TestDeleteCourse() {
$code = 'COURSEX';
$code = 'COURSETEST';
$res = CourseManager::delete_course($code);
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {

@ -188,7 +188,7 @@ class TestSocial extends UnitTestCase{
}
/*
public function TestDeleteCourse(){
$code = 'COURSEX';
$code = 'COURSETEST';
$res = CourseManager::delete_course($code);
$path = api_get_path(SYS_PATH).'archive';
if ($handle = opendir($path)) {

@ -127,7 +127,7 @@ class TestUrlManager extends UnitTestCase {
}
function testrelation_url_course_exist() {
$course_id = 'COURSEX';
$course_id = 'COURSETEST';
$url_id=1;
$resu=UrlManager::relation_url_course_exist($course_id, $url_id);
if(!is_numeric($resu)){

@ -55,7 +55,7 @@ class TestSurvey extends UnitTestCase {
public function testGetSurvey() {
$course_code = 'COURSEX';
$course_code = 'COURSETEST';
$survey_id=1;
$res3 = $this->smanager->get_survey($survey_id,0,$course_code);
$this->assertTrue(is_array($res3));

@ -54,7 +54,7 @@ class TestsSuite extends TestSuite {
global $_configuration, $_user, $_course, $cidReq;
$cidReq = 'COURSEX';
$cidReq = 'COURSETEST';
// check if course exists
$table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$sql = "SELECT code FROM $table_course WHERE code = '$cidReq' ";

Loading…
Cancel
Save