diff --git a/tests/main/auth/lost_password.lib.test.php b/tests/main/auth/lost_password.lib.test.php index 4658bc6e78..afbe935d91 100755 --- a/tests/main/auth/lost_password.lib.test.php +++ b/tests/main/auth/lost_password.lib.test.php @@ -4,6 +4,9 @@ require_once(api_get_path(LIBRARY_PATH).'course.lib.php'); class TestLostPassword extends UnitTestCase { + public function __construct(){ + $this->UnitTestCase('Lost password library - main/auth/lost_password.lib.test.php'); + } /* function commented in platform code function testget_email_headers(){ global $charset; @@ -17,10 +20,10 @@ class TestLostPassword extends UnitTestCase { function testget_secret_word(){ global $_configuration; $add=''; - $res = Login::get_secret_word($add); + $res = Login::get_secret_word($add); // Expects an string of 32 chars $this->assertEqual(strlen($res),32); - + $this->assertTrue(is_string($res)); //var_dump($res); } @@ -32,7 +35,7 @@ class TestLostPassword extends UnitTestCase { $secretword = Login::get_secret_word($thisUser["email"]); $reset_link = get_lang('Pass')." : $thisUser[password]"; $userAccountList[] = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$thisUser["loginName"]."\n".get_lang('ResetLink').' : '.$reset_link.''; - $res = Login::get_user_account_list($user, $reset = false); + $res = Login::get_user_account_list($user, $reset = false); $this->assertTrue(is_array($userAccountList)); //var_dump($userAccountList); } @@ -54,7 +57,7 @@ class TestLostPassword extends UnitTestCase { $sender_name = api_get_setting('administratorName').' '.api_get_setting('administratorSurname'); $email_admin = api_get_setting('emailAdministrator'); $res=Login::handle_encrypted_password($user); - + if(!is_array($res))$this->assertTrue(is_null($res)); ob_end_clean(); //var_dump($res); @@ -63,7 +66,7 @@ class TestLostPassword extends UnitTestCase { function testreset_password(){ $secret='1234567891011'; $id=5; - $res=Login::reset_password($secret, $id); + $res=Login::reset_password($secret, $id); $this->assertTrue($res); $this->assertTrue(is_string($res)); //var_dump($res); diff --git a/tests/main/auth/openid/xrds.lib.test.php b/tests/main/auth/openid/xrds.lib.test.php index 6148c0ea55..ad5ae85726 100755 --- a/tests/main/auth/openid/xrds.lib.test.php +++ b/tests/main/auth/openid/xrds.lib.test.php @@ -3,6 +3,9 @@ require_once(api_get_path(SYS_CODE_PATH).'auth/openid/xrds.lib.php'); class TestXrds extends UnitTestCase { + public function __construct(){ + $this->UnitTestCase('XRDS library for OpenID - main/auth/openid/xrds.lib.test.php'); + } /* function testxrds_cdata() { global $xrds_open_elements, $xrds_services, $xrds_current_service; @@ -13,9 +16,9 @@ class TestXrds extends UnitTestCase { //var_dump($res); } */ - + function testxrdsparse() { - + $xml = << @@ -24,13 +27,13 @@ class TestXrds extends UnitTestCase { XML; - $parser = xrds_parse($xml); + $parser = xrds_parse($xml); if (is_resource($parser)) { $this->assertTrue(is_resource($parser)); } else { $this->assertTrue(is_null($parser)); } - } + } /* function test_xrds_element_end() { global $xrds_open_elements, $xrds_services, $xrds_current_service; @@ -46,14 +49,14 @@ XML; } function test_xrds_element_start() { - + global $xrds_open_elements; - + $name=''; $attribs=''; - + $res=_xrds_element_start(&$parser, $name, $attribs); - + $this->assertTrue(is_null($res)); //var_dump($res); } diff --git a/tests/main/chat/chat_functions.lib.test.php b/tests/main/chat/chat_functions.lib.test.php index 6442651d72..1c9d94d417 100755 --- a/tests/main/chat/chat_functions.lib.test.php +++ b/tests/main/chat/chat_functions.lib.test.php @@ -4,6 +4,10 @@ require_once(api_get_path(LIBRARY_PATH).'course.lib.php'); class TestChatFunctions extends UnitTestCase { + public function __construct(){ + $this->UnitTestCase('Chat library - main/chat/chat_functions.lib.test.php'); + } + public function setUp() { $this->tcourse = new CourseManager(); } diff --git a/tests/main/conference/get_translation.lib.test.php b/tests/main/conference/get_translation.lib.test.php index 89bccd4e87..001bd3df98 100755 --- a/tests/main/conference/get_translation.lib.test.php +++ b/tests/main/conference/get_translation.lib.test.php @@ -3,9 +3,9 @@ require_once(api_get_path(SYS_CODE_PATH).'conference/get_translation.lib.php'); class TestGetTranslation extends UnitTestCase { - public function __construct() { - $this->UnitTestCase('Conference translation getter library - main/conference/get_translation.lib.test.php'); - } + public function __construct() { + $this->UnitTestCase('Conference translation getter library - main/conference/get_translation.lib.test.php'); + } function testget_language_file_as_xml(){ ob_start(); @@ -13,5 +13,4 @@ class TestGetTranslation extends UnitTestCase { ob_end_clean(); $this->assertTrue(is_string($res)); } -} -?> +} \ No newline at end of file diff --git a/tests/main/exercice/hotpotatoes.lib.test.php b/tests/main/exercice/hotpotatoes.lib.test.php index 1ef540daa3..78e821c9b9 100755 --- a/tests/main/exercice/hotpotatoes.lib.test.php +++ b/tests/main/exercice/hotpotatoes.lib.test.php @@ -3,6 +3,10 @@ require_once(api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php'); class TestHotpotatoes extends UnitTestCase { + public function __construct() { + $this->UnitTestCase('Hotpotatoes exercises library - main/exercice/hotpotatoes.lib.test.php'); + } + function testCheckImageName() { $imgparams=array(); $string='';