create test oppenoffice_document oppenoffice_presentation, oppenoffice_text oppenoffice_text_document CT#191

skala
Carlos Vargas 15 years ago
parent 8d951e192f
commit eaa8546ee2
  1. 8
      tests/main/newscorm/openoffice_document.class.test.php
  2. 38
      tests/main/newscorm/openoffice_presentation.class.test.php
  3. 50
      tests/main/newscorm/openoffice_text.class.test.php
  4. 47
      tests/main/newscorm/openoffice_text_document.class.test.php

@ -0,0 +1,8 @@
<?php
/*
* Created on 18/02/2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
?>

@ -0,0 +1,38 @@
<?php
//require_once(api_get_path(SYS_CODE_PATH).'newscorm/openoffice_presentation.class.php');
class TestOpenofficePresentation extends UnitTestCase {
/*
public function testAddItem() {
//ob_start();
$res = OpenofficePresentation::make_lp($files=array());
$this->assertTrue(is_numeric($res));
//ob_end_clean();
//var_dump($res);
}
public function testAddCommandParameters() {
//ob_start();
$res = OpenofficePresentation::add_command_parameters();
$this->assertTrue(is_numeric($res));
//ob_end_clean();
//var_dump($res);
}
public function testSetSlideSize() {
//ob_start();
$res = OpenofficePresentation::set_slide_size($width = '400',$height = '500');
$this->assertTrue(is_numeric($res));
//ob_end_clean();
//var_dump($res);
}
public function testAddDocsToVisio() {
//ob_start();
$res = OpenofficePresentation::add_docs_to_visio($files=array());
$this->assertTrue(is_numeric($res));
//ob_end_clean();
//var_dump($res);
}*/
}
?>

@ -0,0 +1,50 @@
<?php
require_once(api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php');
require_once(api_get_path(SYS_CODE_PATH).'newscorm/openoffice_text.class.php');
require_once(api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
class TestOpenOfficeTextClass extends UnitTestCase {
public function testOpenOfficeText() {
//ob_start();
$res = OpenofficeText::make_lp($files=array());
$this->assertTrue(is_bool($res));
//ob_end_clean();
//var_dump($res);
}
/*
public function testDealPerChapter() {
//ob_start();
$obj = new OpenofficeText($split_steps=false, $course_code=null, $resource_id=null,$user_id=null);
$res = $obj->dealPerChapter($header = 'Header', $content = 'Content');
$this->assertTrue(is_null($res));
//ob_end_clean();
//var_dump($res);
}
public function testDalPerPage() {
//ob_start();
$obj = new OpenofficeText($split_steps=false, $course_code=null, $resource_id=null,$user_id=null);
$res = $obj->dealPerPage($header = 'Header', $body= 'Body');
$this->assertTrue(is_null($res));
//ob_end_clean();
//var_dump($res);
}
*/
public function testAddCommandParameters() {
//ob_start();
$res = OpenofficeText::add_command_parameters();
$this->assertTrue(is_string($res));
//ob_end_clean();
//var_dump($res);
}
public function testFormatPageContent() {
//ob_start();
$res = OpenofficeText::format_page_content($header = 'Header', $content = 'Content');
$this->assertTrue(is_string($res));
//ob_end_clean();
//var_dump($res);
}
}
?>

@ -0,0 +1,47 @@
<?php
//require_once(api_get_path(SYS_CODE_PATH).'newscorm/openoffice_text_document.class.php');
class TestOpenOfficeTextDocument extends UnitTestCase {
/*
public function testMakeLp() {
//ob_start();
$obj = new OpenofficeTextDocument($split_steps=false, $course_code=null, $resource_id=null,$user_id=null);
$res = $obj->make_lp($files=array());
$this->assertTrue(is_bool($res));
//ob_end_clean();
//var_dump($res);
}
public function testDealPerChapter() {
//ob_start();
$res = OpenOfficeTextDocument::dealPerChapter($header = 'Header', $content = 'Content');
$this->assertTrue(is_null($res));
//ob_end_clean();
//var_dump($res);
}
public function testDealPerPage() {
//ob_start();
$res = OpenOfficeTextDocument::dealPerPage($header = 'Header',$body = 'Content');
$this->assertTrue(is_null($res));
//ob_end_clean();
//var_dump($res);
}
public function testAddCommandParameters() {
//ob_start();
$res = OpenOfficeTextDocument::add_command_parameters();
$this->assertTrue(is_string($res));
//ob_end_clean();
//var_dump($res);
}
public function testFormatPageContent() {
//ob_start();
$res = OpenOfficeTextDocument::format_page_content($header = 'Header', $content = 'Content');
$this->assertTrue(is_string($res));
//ob_end_clean();
//var_dump($res);
} */
}
?>
Loading…
Cancel
Save