You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.3 KiB
62 lines
1.3 KiB
|
16 years ago
|
<?php
|
||
|
16 years ago
|
require_once(api_get_path(LIBRARY_PATH).'notebook.lib.php');
|
||
|
16 years ago
|
|
||
|
|
//require_once api_get_path(SYS_CODE_PATH).'inc/global.inc.php';
|
||
|
|
class TestNotebook extends UnitTestCase {
|
||
|
|
|
||
|
|
function testJavascriptNotebook() {
|
||
|
|
ob_start();
|
||
|
|
$values =array();
|
||
|
|
$res = NotebookManager::javascript_notebook($values);
|
||
|
16 years ago
|
$this->assertTrue(is_string($res));
|
||
|
16 years ago
|
ob_end_clean();
|
||
|
|
//var_dump($res);
|
||
|
|
}
|
||
|
|
|
||
|
|
function testSaveNote() {
|
||
|
|
ob_start();
|
||
|
|
$values =array();
|
||
|
|
$res = NotebookManager::save_note($values);
|
||
|
|
$this->assertTrue(is_bool($res));
|
||
|
|
ob_end_clean();
|
||
|
|
//var_dump($res);
|
||
|
|
}
|
||
|
|
|
||
|
|
function testGetNoteInformation() {
|
||
|
|
ob_start();
|
||
|
|
$notebook_id=1;
|
||
|
|
$res = NotebookManager::get_note_information($notebook_id);
|
||
|
|
$this->assertTrue(!(bool)$res);
|
||
|
|
ob_end_clean();
|
||
|
|
//var_dump($res);
|
||
|
|
}
|
||
|
|
|
||
|
|
function testUpdateNote() {
|
||
|
|
ob_start();
|
||
|
|
$values=array();
|
||
|
|
$res = NotebookManager::update_note($values);
|
||
|
|
$this->assertTrue(is_bool($res));
|
||
|
|
ob_end_clean();
|
||
|
|
//var_dump($res);
|
||
|
|
}
|
||
|
|
|
||
|
|
function testDisplayNotes() {
|
||
|
|
ob_start();
|
||
|
|
$res = NotebookManager::display_notes();
|
||
|
|
$this->assertTrue(is_null($res));
|
||
|
|
ob_end_clean();
|
||
|
|
//var_dump($res);
|
||
|
|
}
|
||
|
|
|
||
|
|
function testDeleteNote() {
|
||
|
|
ob_start();
|
||
|
|
$notebook_id=1;
|
||
|
|
$res = NotebookManager::delete_note($notebook_id);
|
||
|
|
$this->assertTrue(is_bool($res));
|
||
|
|
ob_end_clean();
|
||
|
|
//var_dump($res);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
?>
|