parent
ea8f42eab2
commit
b2ba012df2
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@ |
||||
<?php |
||||
|
||||
require_once(api_get_path(SYS_CODE_PATH).'newscorm/scormItem.class.php'); |
||||
require_once(api_get_path(SYS_CODE_PATH).'newscorm/learnpathItem.class.php'); |
||||
|
||||
class TestScormItem extends UnitTestCase { |
||||
|
||||
public function testGetFlatList() { |
||||
//ob_start(); |
||||
$obj = new scormItem($type='manifest',&$element); |
||||
$res = $obj->get_flat_list(&$list,&$abs_order,$rel_order=1,$level=0); |
||||
$this->assertTrue(is_null($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
/* |
||||
public function testSave() { |
||||
//ob_start(); |
||||
$obj = new scormItem($type='manifest',&$element); |
||||
$res = $obj->save($from_outside=true,$prereqs_complete=false); |
||||
$this->assertTrue(is_null($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
}*/ |
||||
} |
||||
?> |
@ -0,0 +1,39 @@ |
||||
<?php |
||||
require_once(api_get_path(SYS_CODE_PATH).'newscorm/scormOrganization.class.php'); |
||||
|
||||
class TestScormOrganization extends UnitTestCase { |
||||
|
||||
public function testget_flat_items_list() { |
||||
//ob_start(); |
||||
$obj = new scormOrganization($type='manifest',&$element,$scorm_charset='UTF-8'); |
||||
$res = $obj->get_flat_items_list(); |
||||
$this->assertTrue(is_array($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
|
||||
public function testGetScormType() { |
||||
//ob_start(); |
||||
$res = scormOrganization::get_name(); |
||||
$this->assertTrue(is_string($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
|
||||
public function testGetRef() { |
||||
//ob_start(); |
||||
$res = scormOrganization::get_ref(); |
||||
$this->assertTrue(is_string($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
|
||||
public function testSetName() { |
||||
//ob_start(); |
||||
$res = scormOrganization::set_name($title = 'Titulo'); |
||||
$this->assertTrue(is_null($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
} |
||||
?> |
@ -0,0 +1,30 @@ |
||||
<?php |
||||
require_once(api_get_path(SYS_CODE_PATH).'newscorm/scormResource.class.php'); |
||||
|
||||
class TestScormResource extends UnitTestCase { |
||||
/* |
||||
function testScormResource() { |
||||
//ob_start(); |
||||
$res = scormResource::scormResource($type='manifest',&$element); |
||||
$this->assertTrue(is_bool($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
*/ |
||||
public function testGetPath() { |
||||
//ob_start(); |
||||
$res = scormResource::get_path(); |
||||
$this->assertTrue(is_string($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
|
||||
public function testGetScormType() { |
||||
//ob_start(); |
||||
$res = scormResource::get_scorm_type(); |
||||
$this->assertTrue(is_string($res)); |
||||
//ob_end_clean(); |
||||
//var_dump($res); |
||||
} |
||||
} |
||||
?> |
Loading…
Reference in new issue