ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilXHTMLPageTest Class Reference

Class ilXHTMLPageTest needsInstalledILIAS. More...

+ Inheritance diagram for ilXHTMLPageTest:
+ Collaboration diagram for ilXHTMLPageTest:

Public Member Functions

 testSetGetSettings ()
 IL_Init More...
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $backupGlobals = FALSE
 

Detailed Description

Class ilXHTMLPageTest needsInstalledILIAS.

Definition at line 28 of file ilXHTMLPageTest.php.

Member Function Documentation

◆ setUp()

ilXHTMLPageTest::setUp ( )
protected

Definition at line 32 of file ilXHTMLPageTest.php.

33  {
34  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
35  ilUnitUtil::performInitialisation();
36  }

◆ testSetGetSettings()

ilXHTMLPageTest::testSetGetSettings ( )

IL_Init

Definition at line 41 of file ilXHTMLPageTest.php.

References $result, ilXHTMLPage\_lookupContent(), and ilXHTMLPage\_lookupSavedContent().

42  {
43  include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
44 
45  $page = new ilXHTMLPage();
46  $page->setContent("aaa");
47  $page->save();
48  $page_id = $page->getId();
49 
50  // save/read
51  $page = new ilXHTMLPage($page_id);
52  if ($page->getContent() == "aaa")
53  {
54  $result.= "saveread-";
55  }
56  $page->setContent("bbb");
57  $page->save();
58 
59  // lookups
60  if (ilXHTMLPage::_lookupContent($page_id) == "bbb")
61  {
62  $result.= "lookupContent-";
63  }
64 
65  if (ilXHTMLPage::_lookupSavedContent($page_id) == "aaa")
66  {
67  $result.= "lookupSavedContent-";
68  }
69 
70  // undo
71  $page->undo();
72 
73  if (ilXHTMLPage::_lookupContent($page_id) == "aaa")
74  {
75  $result.= "undo1-";
76  }
77 
78  if (ilXHTMLPage::_lookupSavedContent($page_id) == "bbb")
79  {
80  $result.= "undo2-";
81  }
82 
83  // clear
84  $page->clear();
85  if (ilXHTMLPage::_lookupContent($page_id) == "")
86  {
87  $result.= "clear1-";
88  }
89 
90  if (ilXHTMLPage::_lookupSavedContent($page_id) == "aaa")
91  {
92  $result.= "clear2-";
93  }
94 
95  $this->assertEquals("saveread-lookupContent-lookupSavedContent-undo1-undo2-clear1-clear2-", $result);
96  }
$result
static _lookupContent($a_id)
Lookup Content.
XHTML Page class.
static _lookupSavedContent($a_id)
Lookup Saved Content.
+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilXHTMLPageTest::$backupGlobals = FALSE
protected

Definition at line 30 of file ilXHTMLPageTest.php.


The documentation for this class was generated from the following file: