learnpath.class.test.php 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493
  1. <?php
  2. require_once(api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php');
  3. class TestLearnpath extends UnitTestCase {
  4. const course = 'COURSETEST';
  5. public function testAddItem() {
  6. //ob_start();
  7. $parent = 2;
  8. $previous = 1;
  9. $type = 'dokeos_chapter';
  10. $id = 1;
  11. $title = 'Titulo';
  12. $description = 'Descripcion';
  13. $prerequisites = 0;
  14. $max_time_allowed = 0;
  15. $lp_id=1;
  16. $user_id=1;
  17. $obj = new learnpath(self::course, $lp_id, $user_id);
  18. $res = $obj->add_item($parent, $previous, $type, $id, $title, $description, $prerequisites, $max_time_allowed);
  19. $this->assertTrue(is_numeric($res));
  20. //ob_end_clean();
  21. //var_dump($res);
  22. }
  23. public function testAddLp() {
  24. //ob_start();
  25. $name = '';
  26. $description = '';
  27. $learnpath = 'guess';
  28. $origin = 'zip';
  29. $zipname = '';
  30. $res = learnpath::add_lp(self::course, $name, $description, $learnpath, $origin, $zipname);
  31. $this->assertTrue(is_null($res));
  32. //ob_end_clean();
  33. //var_dump($res);
  34. }
  35. public function testAppendMessage() {
  36. //ob_start();
  37. $string = '';
  38. $res = learnpath::append_message($string);
  39. $this->assertTrue(is_null($res));
  40. //ob_end_clean();
  41. //var_dump($res);
  42. }
  43. /*
  44. public function testAutocompleteParents() {
  45. //ob_start();
  46. $item = 1;
  47. $course='COURSETEST';
  48. $lp_id=1;
  49. $user_id=1;
  50. $obj = new learnpath($course, $lp_id, $user_id);
  51. $res = $obj->autocomplete_parents($item);
  52. $this->assertTrue(is_numeric($res));
  53. //ob_end_clean();
  54. var_dump($res);
  55. }
  56. */
  57. public function testAutosave() {
  58. //ob_start();
  59. $res = learnpath::autosave();
  60. $this->assertTrue(is_null($res));
  61. //ob_end_clean();
  62. //var_dump($res);
  63. }
  64. public function testBuildActionMenu() {
  65. ob_start();
  66. $res = learnpath::build_action_menu();
  67. $this->assertTrue(is_null($res));
  68. ob_end_clean();
  69. //var_dump($res);
  70. }
  71. /*
  72. public function testBuildTree() {
  73. //ob_start();
  74. $course = 'COURSETEST';
  75. $lp_id = 0;
  76. $user_id = 1;
  77. $obj = new learnpath($course, $lp_id, $user_id);
  78. $res = $obj->build_tree();
  79. $this->assertTrue(is_string($res));
  80. //ob_end_clean();
  81. //var_dump($res);
  82. }
  83. */
  84. public function testClearMessage() {
  85. //ob_start();
  86. $res = learnpath::clear_message();
  87. $this->assertTrue(is_null($res));
  88. //ob_end_clean();
  89. //var_dump($res);
  90. }
  91. public function testClose() {
  92. //ob_start();
  93. $res = learnpath::close();
  94. $this->assertTrue(is_bool($res));
  95. //ob_end_clean();
  96. //var_dump($res);
  97. }
  98. public function testCreateDocument() {
  99. //ob_start();
  100. $_course = '';
  101. $res = learnpath::create_document($_course);
  102. $this->assertTrue(is_numeric($res));
  103. //ob_end_clean();
  104. //var_dump($res);
  105. }
  106. /*
  107. public function testCreateJs() {
  108. //ob_start();
  109. $res = learnpath::create_js();
  110. $this->assertTrue(is_string($res));
  111. //ob_end_clean();
  112. //var_dump($res);
  113. }
  114. */
  115. public function testCreatePath() {
  116. //ob_start();
  117. $path = '';
  118. $res = learnpath::create_path($path);
  119. $this->assertTrue(is_null($res));
  120. //ob_end_clean();
  121. //var_dump($res);
  122. }
  123. public function testCreateTreeArray() {
  124. //ob_start();
  125. $array = '';
  126. $parent = 0;
  127. $depth = -1;
  128. $tmp = array ();
  129. $res = learnpath::create_tree_array($array, $parent, $depth, $tmp);
  130. $this->assertTrue(is_null($res));
  131. //ob_end_clean();
  132. //var_dump($res);
  133. }
  134. public function testDisplayDocument() {
  135. //ob_start();
  136. $id = 1;
  137. $show_title = false;
  138. $iframe = true;
  139. $edit_link = false;
  140. $res = learnpath::display_document($id, $show_title, $iframe, $edit_link);
  141. $this->assertTrue(is_string($res));
  142. //ob_end_clean();
  143. //var_dump($res);
  144. }
  145. /*
  146. public function testDisplayDocumentForm() {
  147. //ob_start();
  148. $action = 'add';
  149. $id = 0;
  150. $extra_info = 'new';
  151. $course='COURSETEST';
  152. $lp_id=1;
  153. $user_id=1;
  154. $obj = new learnpath($course, $lp_id, $user_id);
  155. $res = $obj->display_document_form($action, $id, $extra_info);
  156. $this->assertTrue(is_string($res));
  157. //ob_end_clean();
  158. //var_dump($res);
  159. }
  160. */
  161. public function testDisplayEditItem() {
  162. //ob_start();
  163. $item_id = '';
  164. $res = learnpath::display_edit_item($item_id);
  165. $this->assertTrue(is_string($res));
  166. //ob_end_clean();
  167. //var_dump($res);
  168. }
  169. /*
  170. public function testDisplayForumForm() {
  171. //ob_start();
  172. $action = 'add';
  173. $id = 0;
  174. $extra_info = '';
  175. $course='COURSETEST';
  176. $lp_id=1;
  177. $user_id=1;
  178. $obj = new learnpath($course, $lp_id, $user_id);
  179. $res = $obj->display_forum_form($action, $id, $extra_info);
  180. $this->assertTrue(is_string($res));
  181. //ob_end_clean();
  182. //var_dump($res);
  183. }
  184. public function testDisplayHotpotatoesForm() {
  185. //ob_start();
  186. $action = 'add';
  187. $id = 0;
  188. $extra_info = '';
  189. $course='COURSETEST';
  190. $lp_id=1;
  191. $user_id=1;
  192. $obj = new learnpath($course, $lp_id, $user_id);
  193. $res = $obj->display_hotpotatoes_form($action, $id, $extra_info);
  194. $this->assertTrue(is_string($res));
  195. //ob_end_clean();
  196. //var_dump($res);
  197. }
  198. */
  199. public function testDisplayItem() {
  200. //ob_start();
  201. $item_id = '';
  202. $iframe = true;
  203. $msg = '';
  204. $res = learnpath::display_item($item_id, $iframe, $msg);
  205. $this->assertTrue(is_string($res));
  206. //ob_end_clean();
  207. //var_dump($res);
  208. }
  209. /* public function testDisplayItemForm() {
  210. //ob_start();
  211. $item_type = '';
  212. $title = '';
  213. $action = 'add';
  214. $id = 0;
  215. $extra_info = 'new';
  216. $course='COURSETEST';
  217. $lp_id = 1;
  218. $user_id = 1;
  219. $obj = new learnpath($course, $lp_id, $user_id);
  220. $res = $obj->display_item_form($item_type, $title, $action, $id, $extra_info);
  221. $this->assertTrue(is_string($res));
  222. //ob_end_clean();
  223. //var_dump($res);
  224. }
  225. public function testDisplayItemPrerequisitesForm() {
  226. //ob_start();
  227. $item_id = '';
  228. $course='COURSETEST';
  229. $lp_id=1;
  230. $user_id=1;
  231. $obj = new learnpath($course, $lp_id, $user_id);
  232. $res = $obj->display_item_prerequisites_form($item_id);
  233. $this->assertTrue(is_string($res));
  234. //ob_end_clean();
  235. //var_dump($res);
  236. }
  237. */
  238. public function testDisplayItemSmallForm() {
  239. //ob_start();
  240. $item_type = '';
  241. $title = '';
  242. $data = '';
  243. $res = learnpath::display_item_small_form($item_type, $title, $data);
  244. $this->assertTrue(is_string($res));
  245. //ob_end_clean();
  246. //var_dump($res);
  247. }
  248. /*
  249. public function testDisplayLinkForm() {
  250. //ob_start();
  251. $action = 'add';
  252. $id = 0;
  253. $extra_info = '';
  254. $course='COURSETEST';
  255. $lp_id=1;
  256. $user_id=1;
  257. $obj = new learnpath($course, $lp_id, $user_id);
  258. $res = $obj->display_link_form($action, $id, $extra_info);
  259. $this->assertTrue(is_string($res));
  260. //ob_end_clean();
  261. //var_dump($res);
  262. }
  263. public function testDisplayManipulate() {
  264. //ob_start();
  265. $item_id = '';
  266. $item_type = TOOL_DOCUMENT;
  267. $res = learnpath::display_manipulate($item_id, $item_type);
  268. $this->assertTrue(is_string($res));
  269. //ob_end_clean();
  270. //var_dump($res);
  271. }
  272. */
  273. public function testDisplayMoveItem() {
  274. //ob_start();
  275. $item_id = '';
  276. $res = learnpath::display_move_item($item_id);
  277. $this->assertTrue(is_string($res));
  278. //ob_end_clean();
  279. //var_dump($res);
  280. }
  281. /*
  282. public function testDisplayQuizForm() {
  283. //ob_start();
  284. $action = 'add';
  285. $id = 0;
  286. $extra_info = '';
  287. $course='COURSETEST';
  288. $lp_id=1;
  289. $user_id=1;
  290. $obj = new learnpath($course, $lp_id, $user_id);
  291. $res = $obj->display_quiz_form($action, $id, $extra_info);
  292. $this->assertTrue(is_string($res));
  293. //ob_end_clean();
  294. //var_dump($res);
  295. }
  296. */
  297. /* public function testDisplayResources() {
  298. //ob_start();
  299. $course='COURSETEST';
  300. $lp_id=1;
  301. $user_id=1;
  302. $obj = new learnpath($course, $lp_id, $user_id);
  303. $res = $obj->display_resources();
  304. $this->assertTrue(is_string($res));
  305. //ob_end_clean();
  306. //var_dump($res);
  307. }
  308. public function testDisplayStudentPublicationForm() {
  309. //ob_start();
  310. $action = 'add';
  311. $id = 0;
  312. $extra_info = '';
  313. $course='COURSETEST';
  314. $lp_id=1;
  315. $user_id=1;
  316. $obj = new learnpath($course, $lp_id, $user_id);
  317. $res = $obj->display_student_publication_form($action, $id, $extra_info);
  318. $this->assertTrue(is_string($res));
  319. //ob_end_clean();
  320. //var_dump($res);
  321. }
  322. public function testDisplayThreadForm() {
  323. //ob_start();
  324. $action = 'add';
  325. $id = 0;
  326. $extra_info = '';
  327. $course='COURSETEST';
  328. $lp_id=1;
  329. $user_id=1;
  330. $obj = new learnpath($course, $lp_id, $user_id);
  331. $res = $obj->display_thread_form($action, $id, $extra_info);
  332. $this->assertTrue(is_string($res));
  333. //ob_end_clean();
  334. //var_dump($res);
  335. }
  336. */
  337. public function testEditDocument() {
  338. //ob_start();
  339. $_course='';
  340. $res = learnpath::edit_document($_course);
  341. $this->assertTrue(is_null($res));
  342. //ob_end_clean();
  343. //var_dump($res);
  344. }
  345. public function testEditItem() {
  346. //ob_start();
  347. $id = '';
  348. $parent = '';
  349. $previous = '';
  350. $title = '';
  351. $description = '';
  352. $prerequisites = 0;
  353. $audio = NULL;
  354. $max_time_allowed = 0;
  355. $res = learnpath::edit_item($id, $parent, $previous, $title, $description, $prerequisites, $audio, $max_time_allowed);
  356. $this->assertTrue(is_bool($res));
  357. //ob_end_clean();
  358. //var_dump($res);
  359. }
  360. public function testEditItemPrereq() {
  361. //ob_start();
  362. $id = '';
  363. $prerequisite_id = '';
  364. $mastery_score = 0;
  365. $max_score = 100;
  366. $res = learnpath::edit_item_prereq($id, $prerequisite_id, $mastery_score, $max_score);
  367. $this->assertTrue(is_bool($res));
  368. //ob_end_clean();
  369. //var_dump($res);
  370. }
  371. public function testExportLp() {
  372. //ob_start();
  373. $type = 'scorm';
  374. $id = 1;
  375. $zipname = 'FILE';
  376. $res = learnpath::export_lp($type, self::course, $id, $zipname);
  377. $this->assertTrue(is_string($res));
  378. //ob_end_clean();
  379. //var_dump($res);
  380. }
  381. public function testFirst() {
  382. //ob_start();
  383. $res = learnpath::first();
  384. $this->assertTrue(is_null($res));
  385. //ob_end_clean();
  386. //var_dump($res);
  387. }
  388. public function testGetAuthor() {
  389. //ob_start();
  390. $res = learnpath::get_author();
  391. $this->assertTrue(is_string($res));
  392. //ob_end_clean();
  393. //var_dump($res);
  394. }
  395. public function testGetBrotherChapters() {
  396. //ob_start();
  397. $id = '';
  398. $res = learnpath::get_brother_chapters($id);
  399. $this->assertTrue(is_array($res));
  400. //ob_end_clean();
  401. //var_dump($res);
  402. }
  403. public function testGetBrotherItems() {
  404. //ob_start();
  405. $id = '';
  406. $res = learnpath::get_brother_items($id);
  407. $this->assertTrue(is_array($res));
  408. //ob_end_clean();
  409. //var_dump($res);
  410. }
  411. /*
  412. public function testGetCommonIndexTermsByPrefix() {
  413. //ob_start();
  414. $prefix = '';
  415. $res = learnpath::get_common_index_terms_by_prefix($prefix);
  416. $this->assertTrue(is_array($res));
  417. //ob_end_clean();
  418. //var_dump($res);
  419. }
  420. public function testGetCompleteItemsCount() {
  421. //ob_start();
  422. $res = learnpath::get_complete_items_count();
  423. $this->assertTrue(is_numeric($res));
  424. //ob_end_clean();
  425. //var_dump($res);
  426. }
  427. */
  428. public function testGetCurrentItemId() {
  429. //ob_start();
  430. $res = learnpath::get_current_item_id();
  431. $this->assertTrue(is_numeric($res));
  432. //ob_end_clean();
  433. //var_dump($res);
  434. }
  435. public function testGetDbProgress() {
  436. //ob_start();
  437. $lp_id = 0;
  438. $user_id = 1;
  439. $mode = '%';
  440. $course_db = '';
  441. $sincere = false;
  442. $res = learnpath::get_db_progress($lp_id, $user_id, $mode, $course_db, $sincere);
  443. $this->assertTrue(is_string($res));
  444. //ob_end_clean();
  445. //var_dump($res);
  446. }
  447. public function testGetDocuments() {
  448. //ob_start();
  449. $lp_id=1;
  450. $user_id=1;
  451. $obj = new learnpath(self::course, $lp_id, $user_id);
  452. $res = $obj->get_documents();
  453. $this->assertTrue(is_string($res));
  454. //ob_end_clean();
  455. //var_dump($res);
  456. }
  457. public function testGetExercises() {
  458. //ob_start();
  459. $res = learnpath::get_exercises();
  460. $this->assertTrue(is_string($res));
  461. //ob_end_clean();
  462. //var_dump($res);
  463. }
  464. public function testGetExtension() {
  465. //ob_start();
  466. $filename = 'file';
  467. $res = learnpath::get_extension($filename);
  468. $this->assertTrue(is_string($res));
  469. //ob_end_clean();
  470. //var_dump($res);
  471. }
  472. public function testGetFirstItemId() {
  473. //ob_start();
  474. $res = learnpath::get_first_item_id();
  475. $this->assertTrue(is_numeric($res));
  476. //ob_end_clean();
  477. //var_dump($res);
  478. }
  479. public function testGetFlatOrderedItemsList() {
  480. //ob_start();
  481. $lp = 1;
  482. $parent = 0;
  483. $res = learnpath::get_flat_ordered_items_list($lp, $parent);
  484. $this->assertTrue(is_array($res));
  485. //ob_end_clean();
  486. //var_dump($res);
  487. }
  488. /*
  489. public function testGetForums() {
  490. //ob_start();
  491. //require_once api_get_path(WEB_PATH).('forum/forumpublic function.inc.php');
  492. //require_once api_get_path(WEB_PATH).('forum/forumconfig.inc.php');
  493. $course='COURSETEST';
  494. $lp_id=1;
  495. $user_id=1;
  496. $obj = new learnpath($course, $lp_id, $user_id);
  497. $res = $obj->get_forums();
  498. $this->assertTrue(is_string($res));
  499. //ob_end_clean();
  500. //var_dump($res);
  501. }
  502. public function testGetHtmlToc() {
  503. //ob_start();
  504. $course='COURSETEST';
  505. $lp_id=1;
  506. $user_id=1;
  507. $obj = new learnpath($course, $lp_id, $user_id);
  508. $res = $obj->get_html_toc();
  509. $this->assertTrue(is_string($res));
  510. //ob_end_clean();
  511. //var_dump($res);
  512. }
  513. */
  514. public function testGetId() {
  515. //ob_start();
  516. $res = learnpath::get_id();
  517. $this->assertTrue(is_numeric($res));
  518. //ob_end_clean();
  519. //var_dump($res);
  520. }
  521. public function testGetInteractionsCountFromDb() {
  522. //ob_start();
  523. $lp_iv_id = 0;
  524. $res = learnpath::get_interactions_count_from_db($lp_iv_id);
  525. $this->assertTrue(is_numeric($res));
  526. //ob_end_clean();
  527. //var_dump($res);
  528. }
  529. /*
  530. public function testGetItemsDetailsAsJs() {
  531. //ob_start();
  532. $varname='olms.lms_item_types';
  533. $res = learnpath::get_items_details_as_js($varname);
  534. $this->assertTrue(is_string($res));
  535. //ob_end_clean();
  536. //var_dump($res);
  537. }
  538. public function testGetItemsStatusList() {
  539. //ob_start();
  540. $res = learnpath::get_items_status_list();
  541. $this->assertTrue(is_array($res));
  542. //ob_end_clean();
  543. //var_dump($res);
  544. }
  545. public function testGetIvInteractionsArray() {
  546. //ob_start();
  547. $lp_iv_id = '';
  548. $res = learnpath::get_iv_interactions_array($lp_iv_id);
  549. $this->assertTrue(is_array($res));
  550. //ob_end_clean();
  551. //var_dump($res);
  552. }
  553. */
  554. public function testGetIvObjectivesArray() {
  555. //ob_start();
  556. $lp_iv_id = 0;
  557. $res = learnpath::get_iv_objectives_array($lp_iv_id);
  558. $this->assertTrue(is_array($res));
  559. //ob_end_clean();
  560. //var_dump($res);
  561. }
  562. /*
  563. public function testGetJsInfo() {
  564. //ob_start();
  565. $item_id = '';
  566. $course='COURSETEST';
  567. $lp_id=1;
  568. $user_id=1;
  569. $obj = new learnpath($course, $lp_id, $user_id);
  570. $res = $obj->get_js_info($item_id);
  571. $this->assertTrue(is_string($res));
  572. //ob_end_clean();
  573. //var_dump($res);
  574. } */
  575. public function testGetJsLib() {
  576. //ob_start();
  577. $res = learnpath::get_js_lib();
  578. $this->assertTrue(is_string($res));
  579. //ob_end_clean();
  580. //var_dump($res);
  581. }
  582. public function testGetLast() {
  583. //ob_start();
  584. $res = learnpath::get_last();
  585. $this->assertTrue(is_null($res));
  586. //ob_end_clean();
  587. //var_dump($res);
  588. }
  589. public function testGetLink() {
  590. //ob_start();
  591. $type = 'http';
  592. $item_id = null;
  593. $lp_id=1;
  594. $user_id=1;
  595. $obj = new learnpath(self::course, $lp_id, $user_id);
  596. $res = $obj->get_link($type, $item_id);
  597. $this->assertTrue(is_string($res));
  598. //ob_end_clean();
  599. //var_dump($res);
  600. }
  601. public function testGetLinks() {
  602. //ob_start();
  603. $res = learnpath::get_links();
  604. $this->assertTrue(is_string($res));
  605. //ob_end_clean();
  606. //var_dump($res);
  607. }
  608. public function testGetLpSessionId() {
  609. //ob_start();
  610. $res = learnpath::get_lp_session_id();
  611. $this->assertTrue(is_numeric($res));
  612. //ob_end_clean();
  613. //var_dump($res);
  614. }
  615. public function testGetMaker() {
  616. //ob_start();
  617. $res = learnpath::get_maker();
  618. $this->assertTrue(is_string($res));
  619. //ob_end_clean();
  620. //var_dump($res);
  621. }
  622. public function testGetMediaplayer() {
  623. //ob_start();
  624. $autostart='true';
  625. $res = learnpath::get_mediaplayer($autostart);
  626. $this->assertTrue(is_string($res));
  627. //ob_end_clean();
  628. //var_dump($res);
  629. }
  630. public function testGetMessage() {
  631. //ob_start();
  632. $res = learnpath::get_message();
  633. $this->assertTrue(is_string($res));
  634. //ob_end_clean();
  635. //var_dump($res);
  636. }
  637. public function testGetName() {
  638. //ob_start();
  639. $res = learnpath::get_name();
  640. $this->assertTrue(is_string($res));
  641. //ob_end_clean();
  642. //var_dump($res);
  643. }
  644. public function testGetNavigationBar() {
  645. //ob_start();
  646. $lp_id=1;
  647. $user_id=1;
  648. $obj = new learnpath(self::course, $lp_id, $user_id);
  649. $res = $obj->get_navigation_bar();
  650. $this->assertTrue(is_string($res));
  651. //ob_end_clean();
  652. //var_dump($res);
  653. }
  654. public function testGetNextIndex() {
  655. //ob_start();
  656. $res = learnpath::get_next_index();
  657. $this->assertTrue(is_numeric($res));
  658. //ob_end_clean();
  659. //var_dump($res);
  660. }
  661. public function testGetNextItemId() {
  662. //ob_start();
  663. $lp_id=1;
  664. $user_id=1;
  665. $obj = new learnpath(self::course, $lp_id, $user_id);
  666. $res = $obj->get_next_item_id();
  667. $this->assertTrue(is_numeric($res));
  668. //ob_end_clean();
  669. //var_dump($res);
  670. }
  671. public function testGetObjectivesCountFromDb() {
  672. //ob_start();
  673. $lp_iv_id = 0;
  674. $res = learnpath::get_objectives_count_from_db($lp_iv_id);
  675. $this->assertTrue(is_numeric($res));
  676. //ob_end_clean();
  677. //var_dump($res);
  678. }
  679. /*
  680. public function testGetPackageType() {
  681. //ob_start();
  682. $file_path = '';
  683. $file_name = '';
  684. $course='COURSETEST';
  685. $lp_id=1;
  686. $user_id=1;
  687. $obj = new learnpath($course, $lp_id, $user_id);
  688. $res = $obj->get_package_type($file_path, $file_name);
  689. $this->assertTrue(is_string($res));
  690. //ob_end_clean();
  691. //var_dump($res);
  692. }*/
  693. public function testGetPreviewImage() {
  694. //ob_start();
  695. $res = learnpath::get_preview_image();
  696. $this->assertTrue(is_string($res));
  697. //ob_end_clean();
  698. //var_dump($res);
  699. }
  700. public function testGetPreviousIndex() {
  701. //ob_start();
  702. $res = learnpath::get_previous_index();
  703. $this->assertTrue(is_numeric($res));
  704. //ob_end_clean();
  705. //var_dump($res);
  706. }
  707. public function testGetPreviousItemId() {
  708. //ob_start();
  709. $lp_id=1;
  710. $user_id=1;
  711. $obj = new learnpath(self::course, $lp_id, $user_id);
  712. $res = $obj->get_previous_item_id();
  713. $this->assertTrue(is_numeric($res));
  714. //ob_end_clean();
  715. //var_dump($res);
  716. }
  717. public function testGetProgress() {
  718. //ob_start();
  719. $res = learnpath::get_progress();
  720. $this->assertTrue(is_numeric($res));
  721. //ob_end_clean();
  722. //var_dump($res);
  723. }
  724. public function testGetProgressBar() {
  725. //ob_start();
  726. $mode = '';
  727. $percentage = -1;
  728. $text_add = '';
  729. $from_lp = false;
  730. $lp_id=1;
  731. $user_id=1;
  732. $obj = new learnpath(self::course, $lp_id, $user_id);
  733. $res = $obj->get_progress_bar($mode, $percentage, $text_add, $from_lp);
  734. $this->assertTrue(is_string($res));
  735. //ob_end_clean();
  736. //var_dump($res);
  737. }
  738. public function testGetProgressBarMode() {
  739. //ob_start();
  740. $res = learnpath::get_progress_bar_mode();
  741. $this->assertTrue(is_string($res));
  742. //ob_end_clean();
  743. //var_dump($res);
  744. }
  745. public function testGetProgressBarText() {
  746. //ob_start();
  747. $mode = '';
  748. $add = 0;
  749. $lp_id=1;
  750. $user_id=1;
  751. $obj = new learnpath(self::course, $lp_id, $user_id);
  752. $res = $obj->get_progress_bar_text($mode, $add);
  753. $this->assertTrue(is_array($res));
  754. //ob_end_clean();
  755. //var_dump($res);
  756. }
  757. public function testGetProximity() {
  758. //ob_start();
  759. $res = learnpath::get_proximity();
  760. $this->assertTrue(is_string($res));
  761. //ob_end_clean();
  762. //var_dump($res);
  763. }
  764. public function testGetScormPrereqString() {
  765. //ob_start();
  766. $item_id = 1;
  767. $res = learnpath::get_scorm_prereq_string($item_id);
  768. $this->assertTrue(is_bool($res));
  769. //ob_end_clean();
  770. //var_dump($res);
  771. }
  772. public function testGetScormXmlNode() {
  773. //ob_start();
  774. $children = 'children';
  775. $id = 1;
  776. $res = learnpath::get_scorm_xml_node($children, $id);
  777. $this->assertTrue(is_bool($res));
  778. //ob_end_clean();
  779. //var_dump($res);
  780. }
  781. public function testGetStats() {
  782. //ob_start();
  783. $res = learnpath::get_stats();
  784. $this->assertTrue(is_null($res));
  785. //ob_end_clean();
  786. //var_dump($res);
  787. }
  788. public function testGetStatsCourse() {
  789. //ob_start();
  790. $course = '';
  791. $res = learnpath::get_stats_course($course);
  792. $this->assertTrue(is_null($res));
  793. //ob_end_clean();
  794. //var_dump($res);
  795. }
  796. public function testGetStatsLp() {
  797. //ob_start();
  798. $lp = 1;
  799. $res = learnpath::get_stats_lp(self::course, $lp);
  800. $this->assertTrue(is_null($res));
  801. //ob_end_clean();
  802. //var_dump($res);
  803. }
  804. public function testGetStatsLpUser() {
  805. //ob_start();
  806. $lp = 1;
  807. $user = 1;
  808. $res = learnpath::get_stats_lp_user(self::course, $lp, $user);
  809. $this->assertTrue(is_null($res));
  810. //ob_end_clean();
  811. //var_dump($res);
  812. }
  813. public function testGetStatsUser() {
  814. //ob_start();
  815. $user = 1;
  816. $res = learnpath::get_stats_user(self::course, $user);
  817. $this->assertTrue(is_null($res));
  818. //ob_end_clean();
  819. //var_dump($res);
  820. }
  821. public function testGetStudentPublications() {
  822. //ob_start();
  823. $res = learnpath::get_student_publications();
  824. $this->assertTrue(is_string($res));
  825. //ob_end_clean();
  826. //var_dump($res);
  827. }
  828. public function testGetTheme() {
  829. //ob_start();
  830. $res = learnpath::get_theme();
  831. $this->assertTrue(is_string($res));
  832. //ob_end_clean();
  833. //var_dump($res);
  834. }
  835. /*
  836. public function testGetToc() {
  837. //ob_start();
  838. $res = learnpath::get_toc();
  839. $this->assertTrue(is_array($res));
  840. //ob_end_clean();
  841. //var_dump($res);
  842. }
  843. */
  844. public function testGetTotalItemsCount() {
  845. //ob_start();
  846. $res = learnpath::get_total_items_count();
  847. $this->assertTrue(is_numeric($res));
  848. //ob_end_clean();
  849. //var_dump($res);
  850. }
  851. /*
  852. public function testGetTotalItemsCountWithoutChapters() {
  853. //ob_start();
  854. $res = learnpath::get_total_items_count_without_chapters();
  855. $this->assertTrue(is_numeric($res));
  856. //ob_end_clean();
  857. //var_dump($res);
  858. }
  859. */
  860. public function testGetType() {
  861. //ob_start();
  862. $get_name = false;
  863. $res=learnpath::get_type($get_name) ;
  864. $this->assertTrue(is_bool($res));
  865. //ob_end_clean();
  866. //var_dump($res);
  867. }
  868. public function testGetTypeStatic() {
  869. //ob_start();
  870. $lp_id = 0;
  871. $res = learnpath::get_type_static($lp_id);
  872. $this->assertTrue(is_null($res));
  873. //ob_end_clean();
  874. //var_dump($res);
  875. }
  876. public function testGetUpdateQueue() {
  877. //ob_start();
  878. $res = learnpath::get_update_queue();
  879. $this->assertTrue(is_null($res));
  880. //ob_end_clean();
  881. //var_dump($res);
  882. }
  883. public function testGetUserId() {
  884. //ob_start();
  885. $res = learnpath::get_user_id();
  886. $this->assertTrue(is_bool($res));
  887. //ob_end_clean();
  888. //var_dump($res);
  889. }
  890. /*
  891. public function testGetView() {
  892. //ob_start();
  893. $attempt_num = 0;
  894. $course='COURSETEST';
  895. $lp_id=1;
  896. $user_id=1;
  897. $obj = new learnpath($course, $lp_id, $user_id);
  898. $res = $obj->get_view($attempt_num);
  899. $this->assertTrue(is_numeric($res));
  900. //ob_end_clean();
  901. //var_dump($res);
  902. }
  903. */
  904. public function testGetViewId() {
  905. //ob_start();
  906. $lp_id=1;
  907. $user_id=1;
  908. $obj = new learnpath(self::course, $lp_id, $user_id);
  909. $res = $obj->get_view_id();
  910. $this->assertTrue(is_numeric($res));
  911. //ob_end_clean();
  912. //var_dump($res);
  913. }
  914. /*
  915. public function testHasAudio() {
  916. //ob_start();
  917. $res = learnpath::has_audio();
  918. $this->assertTrue(is_bool($res));
  919. //ob_end_clean();
  920. //var_dump($res);
  921. }*/
  922. public function testLearnpath() {
  923. //ob_start();
  924. $course = '';
  925. $lp_id = '';
  926. $user_id = '';
  927. $res = learnpath::__construct($course, $lp_id, $user_id);
  928. $this->assertTrue(is_bool($res));
  929. //ob_end_clean();
  930. //var_dump($res);
  931. }
  932. public function testLog() {
  933. //ob_start();
  934. $msg = '';
  935. $res = learnpath::log($msg);
  936. $this->assertTrue(is_bool($res));
  937. //ob_end_clean();
  938. //var_dump($res);
  939. }
  940. public function testMoveDown() {
  941. //ob_start();
  942. $lp_id = 0;
  943. $res = learnpath::move_down($lp_id);
  944. $this->assertTrue(is_null($res));
  945. //ob_end_clean();
  946. //var_dump($res);
  947. }
  948. public function testMoveItem() {
  949. //ob_start();
  950. $id = 1;
  951. $direction = '';
  952. $res = learnpath::move_item($id, $direction);
  953. $this->assertTrue(is_bool($res));
  954. //ob_end_clean();
  955. //var_dump($res);
  956. }
  957. public function testMoveUp() {
  958. //ob_start();
  959. $lp_id = 0;
  960. $res = learnpath::move_up($lp_id);
  961. $this->assertTrue(is_null($res));
  962. //ob_end_clean();
  963. //var_dump($res);
  964. }
  965. /*
  966. public function testNext() {
  967. //ob_start();
  968. $course='COURSETEST';
  969. $lp_id=1;
  970. $user_id=1;
  971. $obj = new learnpath($course, $lp_id, $user_id);
  972. $res = $obj->next();
  973. $this->assertTrue(is_null($res));
  974. //ob_end_clean();
  975. //var_dump($res);
  976. } */
  977. public function testOpen() {
  978. //ob_start();
  979. $id = '';
  980. $res = learnpath::open($id);
  981. $this->assertTrue(is_null($res));
  982. //ob_end_clean();
  983. //var_dump($res);
  984. }
  985. /*
  986. public function testOverview() {
  987. //ob_start();
  988. $course='COURSETEST';
  989. $lp_id=1;
  990. $user_id=1;
  991. $obj = new learnpath($course, $lp_id, $user_id);
  992. $res = $obj->overview();
  993. $this->assertTrue(is_string($res));
  994. //ob_end_clean();
  995. //var_dump($res);
  996. }
  997. */
  998. public function testPrerequisitesMatch() {
  999. //ob_start();
  1000. $item = null;
  1001. $res = learnpath::prerequisites_match($item);
  1002. $this->assertTrue(is_bool($res));
  1003. //ob_end_clean();
  1004. //var_dump($res);
  1005. }
  1006. /*
  1007. public function testPrevious() {
  1008. //ob_start();
  1009. $course='COURSETEST';
  1010. $lp_id=1;
  1011. $user_id=1;
  1012. $obj = new learnpath($course, $lp_id, $user_id);
  1013. $res = $obj->previous();
  1014. $this->assertTrue(is_null($res));
  1015. //ob_end_clean();
  1016. //var_dump($res);
  1017. }
  1018. */
  1019. /*public function testRestart() {
  1020. //ob_start();
  1021. $course='COURSETEST';
  1022. $lp_id=1;
  1023. $user_id=1;
  1024. $obj = new learnpath($course, $lp_id, $user_id);
  1025. $res = $obj->restart();
  1026. $this->assertTrue(is_bool($res));
  1027. //ob_end_clean();
  1028. //var_dump($res);
  1029. }*/
  1030. public function testSaveCurrent() {
  1031. //ob_start();
  1032. $res = learnpath::save_current();
  1033. $this->assertTrue(is_bool($res));
  1034. //ob_end_clean();
  1035. //var_dump($res);
  1036. }
  1037. public function testSaveItem() {
  1038. //ob_start();
  1039. $item_id = null;
  1040. $from_outside = true;
  1041. $lp_id=1;
  1042. $user_id=1;
  1043. $obj = new learnpath(self::course, $lp_id, $user_id);
  1044. $res = $obj->save_item($item_id, $from_outside);
  1045. $this->assertTrue(is_bool($res));
  1046. //ob_end_clean();
  1047. //var_dump($res);
  1048. }
  1049. public function testSaveLast() {
  1050. //ob_start();
  1051. $lp_id=1;
  1052. $user_id=1;
  1053. $obj = new learnpath(self::course, $lp_id, $user_id);
  1054. $res = $obj->save_last();
  1055. $this->assertTrue(is_null($res));
  1056. //ob_end_clean();
  1057. //var_dump($res);
  1058. }
  1059. /*
  1060. public function testScormExport() {
  1061. //ob_start();
  1062. $course='COURSETEST';
  1063. $lp_id=1;
  1064. $user_id=1;
  1065. $obj = new learnpath($course, $lp_id, $user_id);
  1066. $res = $obj->scorm_export();
  1067. $this->assertTrue(is_string($res));
  1068. //ob_end_clean();
  1069. //var_dump($res);
  1070. }
  1071. */
  1072. public function testSetAuthor() {
  1073. //ob_start();
  1074. $name = '';
  1075. $lp_id=1;
  1076. $user_id=1;
  1077. $obj = new learnpath(self::course, $lp_id, $user_id);
  1078. $res = $obj->set_author($name);
  1079. $this->assertTrue(is_bool($res));
  1080. //ob_end_clean();
  1081. //var_dump($res);
  1082. }
  1083. public function testSetCurrentItem() {
  1084. //ob_start();
  1085. $item_id = null;
  1086. $res = learnpath::set_current_item($item_id);
  1087. $this->assertTrue(is_null($res));
  1088. //ob_end_clean();
  1089. //var_dump($res);
  1090. }
  1091. public function testSetEncoding() {
  1092. //ob_start();
  1093. $enc = 'ISO-8859-15';
  1094. $lp_id=1;
  1095. $user_id=1;
  1096. $obj = new learnpath(self::course, $lp_id, $user_id);
  1097. $res = $obj->set_encoding($enc);
  1098. $this->assertTrue(is_bool($res));
  1099. //ob_end_clean();
  1100. //var_dump($res);
  1101. }
  1102. public function testSetErrorMsg() {
  1103. //ob_start();
  1104. $error = '';
  1105. $res = learnpath::set_error_msg($error);
  1106. $this->assertTrue(is_null($res));
  1107. //ob_end_clean();
  1108. //var_dump($res);
  1109. }
  1110. public function testSetJslib() {
  1111. //ob_start();
  1112. $lib = '';
  1113. $lp_id=1;
  1114. $user_id=1;
  1115. $obj = new learnpath(self::course, $lp_id, $user_id);
  1116. $res = $obj->set_jslib($lib);
  1117. $this->assertTrue(is_bool($res));
  1118. //ob_end_clean();
  1119. //var_dump($res);
  1120. }
  1121. public function testSetMaker() {
  1122. //ob_start();
  1123. $name = '';
  1124. $res = learnpath::set_maker($name);
  1125. $this->assertTrue(is_bool($res));
  1126. //ob_end_clean();
  1127. //var_dump($res);
  1128. }
  1129. public function testSetName() {
  1130. //ob_start();
  1131. $name = '';
  1132. $res = learnpath::set_name($name);
  1133. $this->assertTrue(is_bool($res));
  1134. //ob_end_clean();
  1135. //var_dump($res);
  1136. }
  1137. public function testSetPreviewImage() {
  1138. //ob_start();
  1139. $name = '';
  1140. $lp_id=1;
  1141. $user_id=1;
  1142. $obj = new learnpath(self::course, $lp_id, $user_id);
  1143. $res = $obj->set_preview_image($name);
  1144. $this->assertTrue(is_bool($res));
  1145. //ob_end_clean();
  1146. //var_dump($res);
  1147. }
  1148. public function testSetPreviousItem() {
  1149. //ob_start();
  1150. $id = '';
  1151. $res = learnpath::set_previous_item($id);
  1152. $this->assertTrue(is_null($res));
  1153. //ob_end_clean();
  1154. //var_dump($res);
  1155. }
  1156. public function testSetProximity() {
  1157. //ob_start();
  1158. $name = '';
  1159. $res = learnpath::set_proximity($name);
  1160. $this->assertTrue(is_bool($res));
  1161. //ob_end_clean();
  1162. //var_dump($res);
  1163. }
  1164. public function testSetTermsByPrefix() {
  1165. //ob_start();
  1166. $terms_string = '';
  1167. $prefix = '';
  1168. $res = learnpath::set_terms_by_prefix($terms_string, $prefix);
  1169. $this->assertTrue(is_bool($res));
  1170. //ob_end_clean();
  1171. //var_dump($res);
  1172. }
  1173. public function testSetTheme() {
  1174. //ob_start();
  1175. $name = '';
  1176. $lp_id=1;
  1177. $user_id=1;
  1178. $obj = new learnpath(self::course, $lp_id, $user_id);
  1179. $res = $obj->set_theme($name);
  1180. $this->assertTrue(is_bool($res));
  1181. //ob_end_clean();
  1182. //var_dump($res);
  1183. }
  1184. /*
  1185. public function testSortTreeArray() {
  1186. //ob_start();
  1187. $array = '';
  1188. $course='COURSETEST';
  1189. $lp_id=1;
  1190. $user_id=1;
  1191. $obj = new learnpath($course, $lp_id, $user_id);
  1192. $res = $obj->sort_tree_array($array);
  1193. $this->assertTrue(is_array($res));
  1194. //ob_end_clean();
  1195. //var_dump($res);
  1196. }
  1197. */
  1198. public function testStartCurrentItem() {
  1199. //ob_start();
  1200. $allow_new_attempt = false;
  1201. $res = learnpath::start_current_item($allow_new_attempt);
  1202. $this->assertTrue(is_bool($res));
  1203. //ob_end_clean();
  1204. //var_dump($res);
  1205. }
  1206. public function testStopPreviousItem() {
  1207. //ob_start();
  1208. $res = learnpath::stop_previous_item();
  1209. $this->assertTrue(is_bool($res));
  1210. //ob_end_clean();
  1211. //var_dump($res);
  1212. }
  1213. /*
  1214. public function testTogglePublish() {
  1215. //ob_start();
  1216. $lp_id = '';
  1217. $set_visibility = 'v';
  1218. $res = learnpath::toggle_publish($lp_id, $set_visibility);
  1219. $this->assertTrue(is_null($res));
  1220. //ob_end_clean();
  1221. //var_dump($res);
  1222. }
  1223. */
  1224. public function testToggleVisibility() {
  1225. //ob_start();
  1226. $lp_id = '';
  1227. $set_visibility = 1;
  1228. $res = learnpath::toggle_visibility($lp_id, $set_visibility);
  1229. $this->assertTrue(is_bool($res));
  1230. //ob_end_clean();
  1231. //var_dump($res);
  1232. }
  1233. /*
  1234. public function testTreeArray() {
  1235. //ob_start();
  1236. $array = '';
  1237. $res = learnpath::tree_array($array);
  1238. $this->assertTrue(is_null($res));
  1239. //ob_end_clean();
  1240. //var_dump($res);
  1241. }
  1242. */
  1243. public function testUpdateDefaultScormCommit() {
  1244. //ob_start();
  1245. $lp_id=1;
  1246. $user_id=1;
  1247. $obj = new learnpath(self::course, $lp_id, $user_id);
  1248. $res = $obj->update_default_scorm_commit();
  1249. $this->assertTrue(is_bool($res));
  1250. //ob_end_clean();
  1251. //var_dump($res);
  1252. }
  1253. public function testUpdateDefaultViewMode() {
  1254. //ob_start();
  1255. $lp_id=1;
  1256. $user_id=1;
  1257. $obj = new learnpath(self::course, $lp_id, $user_id);
  1258. $res = $obj->update_default_view_mode();
  1259. $this->assertTrue(is_string($res));
  1260. //ob_end_clean();
  1261. //var_dump($res);
  1262. }
  1263. public function testUpdateDisplayOrder() {
  1264. //ob_start();
  1265. $res = learnpath::update_display_order();
  1266. $this->assertTrue(is_bool($res));
  1267. //ob_end_clean();
  1268. //var_dump($res);
  1269. }
  1270. public function testUpdateReinit() {
  1271. //ob_start();
  1272. $lp_id=1;
  1273. $user_id=1;
  1274. $obj = new learnpath(self::course, $lp_id, $user_id);
  1275. $res = $obj->update_reinit();
  1276. $this->assertTrue(is_numeric($res));
  1277. //ob_end_clean();
  1278. //var_dump($res);
  1279. }
  1280. public function testUpdateScormDebug() {
  1281. //ob_start();
  1282. $lp_id=1;
  1283. $user_id=1;
  1284. $obj = new learnpath(self::course, $lp_id, $user_id);
  1285. $res = $obj->update_scorm_debug();
  1286. $this->assertTrue(is_numeric($res));
  1287. //ob_end_clean();
  1288. //var_dump($res);
  1289. }
  1290. public function testUploadImage() {
  1291. //ob_start();
  1292. $image_array = '';
  1293. $res = learnpath::upload_image($image_array);
  1294. $this->assertTrue(is_bool($res));
  1295. //ob_end_clean();
  1296. //var_dump($res);
  1297. }
  1298. /*
  1299. public function testWriteResourcesTree() {
  1300. //ob_start();
  1301. $resources_sorted = '';
  1302. $num = 0;
  1303. $res = learnpath::write_resources_tree($resources_sorted, $num);
  1304. $this->assertTrue(is_null($res));
  1305. //ob_end_clean();
  1306. //var_dump($res);
  1307. }
  1308. public function testDelete() {
  1309. //ob_start();
  1310. $course = null;
  1311. $id = null;
  1312. $delete = 'keep';
  1313. $course='COURSETEST';
  1314. $lp_id=1;
  1315. $user_id=1;
  1316. $obj = new learnpath($course, $lp_id, $user_id);
  1317. $res = $obj->delete($course, $id, $delete);
  1318. $this->assertTrue(is_null($res));
  1319. //ob_end_clean();
  1320. //var_dump($res);
  1321. }*/
  1322. public function testDeleteChildrenItems() {
  1323. //ob_start();
  1324. $id = '';
  1325. $res = learnpath::delete_children_items($id);
  1326. $this->assertTrue(is_bool($res));
  1327. //ob_end_clean();
  1328. //var_dump($res);
  1329. }
  1330. public function testDeleteItem() {
  1331. //ob_start();
  1332. $id = '';
  1333. $remove = 'keep';
  1334. $res = learnpath::delete_item($id, $remove);
  1335. $this->assertTrue(is_bool($res));
  1336. //ob_end_clean();
  1337. //var_dump($res);
  1338. }
  1339. public function testDeleteLpImage() {
  1340. //ob_start();
  1341. $lp_id=1;
  1342. $user_id=1;
  1343. $obj = new learnpath(self::course, $lp_id, $user_id);
  1344. $res = $obj->delete_lp_image();
  1345. $this->assertTrue(is_bool($res));
  1346. //ob_end_clean();
  1347. //var_dump($res);
  1348. }
  1349. }
  1350. ?>