Feature #272 - Updating the Database class testing unit.

skala
Ivan Tcholakov 15 years ago
parent 4f3f27dab5
commit 7ebd7781d6
  1. 10
      tests/main/inc/lib/database.lib.test.php

@ -72,6 +72,7 @@ class TestDatabase extends UnitTestCase {
$this->assertTrue(is_array($resu));
}
/* // Contains a private unaccessible method, Database::fix_database_parameter().
function testFixDatabaseParameterEmpty() {
$course_info = api_get_course_info();
$database_name= $course_info[""];
@ -81,27 +82,34 @@ class TestDatabase extends UnitTestCase {
endif;
//var_dump($res);
}
*/
/* // Contains a private unaccessible method, Database::fix_database_parameter().
function testFixDatabaseParameterReturnString() {
$course_info = api_get_course_info();
$database_name= $course_info["dbName"];
$res=$this->dbase->fix_database_parameter($course_info);
$this->assertTrue(is_string($res));
}
*/
/* // Contains a private unaccessible method, Database::format_glued_course_table_name().
function testFormatGluedCourseTableName() {
$database_name_with_glue='';
$table='';
$res=$this->dbase->format_glued_course_table_name($database_name_with_glue, $table);
$this->assertTrue(is_string($res));
}
*/
/* // Contains a private unaccessible method, Database::format_table_name().
function testFormatTableName() {
$database='';
$table='';
$res=$this->dbase->format_table_name($database, $table);
$this->assertTrue(is_string($res));
}
*/
function testGenerateAbstractCourseFieldNames() {
$result_array='';
@ -250,12 +258,14 @@ class TestDatabase extends UnitTestCase {
$this->assertTrue($res);
}
/* // Contains a private unaccessible method, Database::glue_course_database_name().
function testGlueCourseDatabaseName() {
$database_name='';
$res=$this->dbase->glue_course_database_name($database_name);
$this->assertTrue(is_string($res));
$this->assertTrue($res);
}
*/
function testInsertId() {
$res=$this->dbase->insert_id();

Loading…
Cancel
Save