Minor - test lib description update

skala
Yannick Warnier 16 years ago
parent 9ffa183f9e
commit f5315ca5ca
  1. 13
      tests/main/auth/lost_password.lib.test.php
  2. 19
      tests/main/auth/openid/xrds.lib.test.php
  3. 4
      tests/main/chat/chat_functions.lib.test.php
  4. 9
      tests/main/conference/get_translation.lib.test.php
  5. 4
      tests/main/exercice/hotpotatoes.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);

@ -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 = <<<XML
<xml version="1.0">
<users>
@ -24,13 +27,13 @@ class TestXrds extends UnitTestCase {
</users>
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);
}

@ -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();
}

@ -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));
}
}
?>
}

@ -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='';

Loading…
Cancel
Save