◆ test_input2xmlEmpty()
      
        
          | PCParagraphTest::test_input2xmlEmpty  | 
          ( | 
           | ) | 
           | 
        
      
 
Test _input2xml (empty) 
Definition at line 34 of file PCParagraphTest.php.
References $res, and ilPCParagraph\_input2xml().
static _input2xml(string $a_text, string $a_lang, bool $a_wysiwyg=false, bool $a_handle_lists=true)
Converts user input to xml User input comes as bb code information, e.g. 
 
 
 
 
◆ test_input2xmlResult()
      
        
          | PCParagraphTest::test_input2xmlResult  | 
          ( | 
           | ) | 
           | 
        
      
 
Test _input2xml. 
Definition at line 75 of file PCParagraphTest.php.
References $out, and ilPCParagraph\_input2xml().
   85                 => 
'xx <Strong>xx</Strong> xx',
    87                 => 
'xx <Comment>xx</Comment> xx',
    89                 => 
'xx <Emph>xx</Emph> xx',
    91                 => 
'xx <Footnote>xx</Footnote> xx',
    92             'xx [code]xx[/code] xx'    93                 => 
'xx <Code>xx</Code> xx',
    95                 => 
'xx <Accent>xx</Accent> xx',
    97                 => 
'xx <Important>xx</Important> xx',
    99                 => 
'xx <Keyw>xx</Keyw> xx',
   100             'xx [sub]xx[/sub] xx'   101                 => 
'xx <Sub>xx</Sub> xx',
   102             'xx [sup]xx[/sup] xx'   103                 => 
'xx <Sup>xx</Sup> xx',
   104             'xx [quot]xx[/quot] xx'   105                 => 
'xx <Quotation>xx</Quotation> xx',
   108             'xx [iln cat="106"] xx [/iln] xx'   109                 => 
'xx <IntLink Target="il__obj_106" Type="RepositoryItem"> xx </IntLink> xx',
   110             'xx [iln page="106"] xx [/iln] xx'   111                 => 
'xx <IntLink Target="il__pg_106" Type="PageObject"> xx </IntLink> xx',
   112             'xx [iln page="106"] xx  xx'   115             => 
'xx xx [/iln] xx',
   116             'xx [iln chap="106"] xx [/iln] xx'   117                 => 
'xx <IntLink Target="il__st_106" Type="StructureObject"> xx </IntLink> xx',
   118             'xx [iln inst="123" page="106"] xx [/iln] xx'   119             => 
'xx <IntLink Target="il_123_pg_106" Type="PageObject"> xx </IntLink> xx',
   120             'xx [iln page="106" target="FAQ"] xx [/iln] xx'   121             => 
'xx <IntLink Target="il__pg_106" Type="PageObject" TargetFrame="FAQ"> xx </IntLink> xx',
   122             'xx [iln page="106" target="New" anchor="test"] xx [/iln] xx'   123             => 
'xx <IntLink Target="il__pg_106" Type="PageObject" TargetFrame="New" Anchor="test"> xx </IntLink> xx',
   124             'xx [iln term="106"] xx [/iln] xx'   125             => 
'xx <IntLink Target="il__git_106" Type="GlossaryItem" TargetFrame="Glossary"> xx </IntLink> xx',
   126             'xx [iln term="106" target="New"] xx [/iln] xx'   127             => 
'xx <IntLink Target="il__git_106" Type="GlossaryItem" TargetFrame="New"> xx </IntLink> xx',
   128             'xx [iln wpage="106"] xx [/iln] xx'   129             => 
'xx <IntLink Target="il__wpage_106" Type="WikiPage"> xx </IntLink> xx',
   130             'xx [iln wpage="106" anchor="test"] xx [/iln] xx'   131             => 
'xx <IntLink Target="il__wpage_106" Type="WikiPage" Anchor="test"> xx </IntLink> xx',
   132             'xx [iln ppage="106"] xx [/iln] xx'   133             => 
'xx <IntLink Target="il__ppage_106" Type="PortfolioPage"> xx </IntLink> xx',
   134             'xx [iln media="545"/] xx '   135             => 
'xx <IntLink Target="il__mob_545" Type="MediaObject"/> xx',
   136             'xx [iln media="108" target="New"] xx [/iln] xx'   137             => 
'xx <IntLink Target="il__mob_108" Type="MediaObject" TargetFrame="New"> xx </IntLink> xx',
   138             'xx [iln media="108" target="Media"] xx [/iln] xx'   139             => 
'xx <IntLink Target="il__mob_108" Type="MediaObject" TargetFrame="Media"> xx </IntLink> xx',
   140             'xx [iln dfile="546"] xx [/iln] xx'   141             => 
'xx <IntLink Target="il__dfile_546" Type="File"> xx </IntLink> xx',
   144             'xx' . chr(13) . chr(10) . 
'yy'   146             'xx' . chr(13) . 
'yy'   148             'xx' . chr(10) . 
'yy'   152             '<ul class="ilc_list_u_BulletedList"><li class="ilc_list_item_StandardListItem">aa</li><li class="ilc_list_item_StandardListItem">bb</li><li class="ilc_list_item_StandardListItem">cc</li></ul>'   153             => 
'<ul class="ilc_list_u_BulletedList"><li class="ilc_list_item_StandardListItem">aa</li><li class="ilc_list_item_StandardListItem">bb</li><li class="ilc_list_item_StandardListItem">cc</li></ul>',
   156             'xx [xln url="http://"][/xln] xxxx'   158             'xx [xln url="http://ilias.de"]www[/xln] xxxx'   159             => 
'xx <ExtLink Href="http://ilias.de">www</ExtLink> xxxx',
   160             'xx [xln url="http://ilias.php?x=1&y=2"]www[/xln] xxxx'   161             => 
'xx <ExtLink Href="http://ilias.php?x=1&y=2">www</ExtLink> xxxx',
   162             'xx [xln url="http://ilias.de/my+document.pdf"]doc[/xln] xxxx'   163             => 
'xx <ExtLink Href="http://ilias.de/my+document.pdf">doc</ExtLink> xxxx',
   164             'xx [xln url="http://ilias.de/my(document.pdf"]doc[/xln] xxxx'   165             => 
'xx <ExtLink Href="http://ilias.de/my(document.pdf">doc</ExtLink> xxxx',
   166             'xx [xln url="http://ilias.de/my)document.pdf"]doc[/xln] xxxx'   167             => 
'xx <ExtLink Href="http://ilias.de/my)document.pdf">doc</ExtLink> xxxx',
   168             'xx [xln url="http://ilias.de/my$document.pdf"]doc[/xln] xxxx'   169             => 
'xx <ExtLink Href="http://ilias.de/my$document.pdf">doc</ExtLink> xxxx',
   170             'xx [xln url="http://ilias.de/my*document.pdf"]doc[/xln] xxxx'   171             => 
'xx <ExtLink Href="http://ilias.de/my*document.pdf">doc</ExtLink> xxxx',
   174             'xx [anc name="test"]test[/anc] xxxx'   175             => 
'xx <Anchor Name="test">test</Anchor> xxxx',
   178             'xx [marked class="test"]test[/marked] xxxx'   179             => 
'xx <Marked Class="test">test</Marked> xxxx',
   183             => 
"xx <br /> \xa0 xxxx",
   185             'xx [xln url="http://ilias.de/my+document.pdf\xa0"]doc[/xln] xxxx'   186             => 
'xx [error: xln url="http://ilias.de/my+document.pdf\xa0"]doc</ExtLink> xxxx',
   194         foreach ($cases as $in => $expected) {
 static _input2xml(string $a_text, string $a_lang, bool $a_wysiwyg=false, bool $a_handle_lists=true)
Converts user input to xml User input comes as bb code information, e.g. 
 
 
 
 
◆ test_input2xmlValidXml()
      
        
          | PCParagraphTest::test_input2xmlValidXml  | 
          ( | 
           | ) | 
           | 
        
      
 
Test _input2xml for validity. 
Definition at line 46 of file PCParagraphTest.php.
References $res, $text, and ilPCParagraph\_input2xml().
   51             'xx [str]xx[/str] xx',
    52             'xx [iln cat="106"] xx',
    56         foreach ($cases as $case) {
    58             $use_internal_errors = libxml_use_internal_errors(
true);
    59             $sxe = simplexml_load_string(
"<?xml version='1.0'?><dummy>" . 
$text . 
"</dummy>");
    60             libxml_use_internal_errors($use_internal_errors);
 
static _input2xml(string $a_text, string $a_lang, bool $a_wysiwyg=false, bool $a_handle_lists=true)
Converts user input to xml User input comes as bb code information, e.g. 
 
 
 
 
◆ testAutoIndent()
      
        
          | PCParagraphTest::testAutoIndent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 491 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  495         $pc->create($page, 
"pg");
   496         $pc->setLanguage(
"en");
   497         $pc->setAutoIndent(
"1");
   503         $page->stripHierIDs();
   506 <PageObject><PageContent><Paragraph Language=
"en" AutoIndent=
"1"></Paragraph></PageContent></PageObject>
   510             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testCharacteristic()
      
        
          | PCParagraphTest::testCharacteristic  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 445 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  449         $pc->create($page, 
"pg");
   450         $pc->setLanguage(
"en");
   451         $pc->setCharacteristic(
"MyChar");
   455             $pc->getCharacteristic()
   457         $page->stripHierIDs();
   460 <PageObject><PageContent><Paragraph Language=
"en" Characteristic=
"MyChar"></Paragraph></PageContent></PageObject>
   464             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testConstruction()
      
        
          | PCParagraphTest::testConstruction  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testCreate()
      
        
          | PCParagraphTest::testCreate  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 393 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  397         $pc->create($page, 
"pg");
   399             '<PageObject HierId="pg"><PageContent><Paragraph Language=""></Paragraph></PageContent></PageObject>',
   400             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testDownloadTitle()
      
        
          | PCParagraphTest::testDownloadTitle  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 514 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  518         $pc->create($page, 
"pg");
   519         $pc->setLanguage(
"en");
   520         $pc->setDownloadTitle(
"title.txt");
   524             $pc->getDownloadTitle()
   526         $page->stripHierIDs();
   529 <PageObject><PageContent><Paragraph Language=
"en" DownloadTitle=
"title.txt"></Paragraph></PageContent></PageObject>
   533             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testHandleAjaxContentLists()
      
        
          | PCParagraphTest::testHandleAjaxContentLists  | 
          ( | 
           | ) | 
           | 
        
      
 
Test HTML to BB transformation, lists (are not transformed in this first step) 
Definition at line 343 of file PCParagraphTest.php.
References $out, and ilPCParagraph\handleAjaxContent().
  347             '<div id="1:1234" class="ilc_text_block_List"><ul class="ilc_list_u_BulletedList"><li class="ilc_list_item_StandardListItem">one</li><li class="ilc_list_item_StandardListItem">two</li><li class="ilc_list_item_StandardListItem">three</li></ul></div>'   349                 "text" => 
'<ul class="ilc_list_u_BulletedList"><li class="ilc_list_item_StandardListItem">one</li><li class="ilc_list_item_StandardListItem">two</li><li class="ilc_list_item_StandardListItem">three</li></ul>',
   354             '<div id="1:1235" class="ilc_text_block_List"><ol class="ilc_list_o_NumberedList"><li class="ilc_list_item_StandardListItem">one</li><li class="ilc_list_item_StandardListItem">two</li><li class="ilc_list_item_StandardListItem">three</li></ol></div>'   356                 "text" => 
'<ol class="ilc_list_o_NumberedList"><li class="ilc_list_item_StandardListItem">one</li><li class="ilc_list_item_StandardListItem">two</li><li class="ilc_list_item_StandardListItem">three</li></ol>',
   362         foreach ($cases as $in => $expected) {
 static handleAjaxContent(string $a_content)
Handle ajax content. 
 
 
 
 
◆ testHandleAjaxContentPost()
      
        
          | PCParagraphTest::testHandleAjaxContentPost  | 
          ( | 
           | ) | 
           | 
        
      
 
Test handleAjaxContentPost. 
Definition at line 206 of file PCParagraphTest.php.
References $out, and ilPCParagraph\handleAjaxContentPost().
  209             '<ul class="ilc_list_u_BulletedList"><li class="ilc_list_item_StandardListItem">aa</li><li class="ilc_list_item_StandardListItem">bb</li><li class="ilc_list_item_StandardListItem">cc</li></ul>'   210             => 
'<SimpleBulletList Class="BulletedList"><SimpleListItem Class="StandardListItem">aa</SimpleListItem><SimpleListItem Class="StandardListItem">bb</SimpleListItem><SimpleListItem Class="StandardListItem">cc</SimpleListItem></SimpleBulletList>',
   211             '<ul class="ilc_list_u_BulletedList"><li class="ilc_list_item_StandardListItem"/></ul>'   212             => 
'<SimpleBulletList Class="BulletedList"><SimpleListItem Class="StandardListItem"></SimpleListItem></SimpleBulletList>'   215         foreach ($cases as $in => $expected) {
 static handleAjaxContentPost(string $text)
Post input2xml handling of ajax content. 
 
 
 
 
◆ testHandleAjaxContentSpans()
      
        
          | PCParagraphTest::testHandleAjaxContentSpans  | 
          ( | 
           | ) | 
           | 
        
      
 
Test HTML to BB transformation, spans. 
Definition at line 227 of file PCParagraphTest.php.
References $out, and ilPCParagraph\handleAjaxContent().
  231             '<div id="1:1234" class="ilc_text_block_Standard">xxx<span class="ilc_text_inline_Strong">xxx</span>xxx</div>'   233                 "text" => 
'xxx[str]xxx[/str]xxx',
   235                 "class" => 
'Standard'   238             '<div id="1:1235" class="ilc_text_block_Mnemonic">xxx<span class="ilc_text_inline_Emph">xxx</span>xxx</div>'   240                 "text" => 
'xxx[emp]xxx[/emp]xxx',
   242                 "class" => 
'Mnemonic'   245             '<div id="1:1236" class="ilc_text_block_Headline1">xxx<span class="ilc_text_inline_Important">xxx</span>xxx</div>'   247                 "text" => 
'xxx[imp]xxx[/imp]xxx',
   249                 "class" => 
'Headline1'   252             '<div id="1:1237" class="ilc_text_block_Standard">xxx a<sup class="ilc_sup_Sup">b*c</sup> xxx</div>'   254                 "text" => 
'xxx a[sup]b*c[/sup] xxx',
   256                 "class" => 
'Standard'   259             '<div id="1:1238" class="ilc_text_block_Standard">xxx a<sub class="ilc_sub_Sub">2</sub> xxx</div>'   261                 "text" => 
'xxx a[sub]2[/sub] xxx',
   263                 "class" => 
'Standard'   266             '<div id="1:1237" class="ilc_text_block_Standard">xxx a<sup>b*c</sup> xxx</div>'   268                 "text" => 
'xxx a[sup]b*c[/sup] xxx',
   270                 "class" => 
'Standard'   273             '<div id="1:1238" class="ilc_text_block_Standard">xxx a<sub>2</sub> xxx</div>'   275                 "text" => 
'xxx a[sub]2[/sub] xxx',
   277                 "class" => 
'Standard'   280             '<div id="1:1239" class="ilc_text_block_Headline2">xxx <span class="ilc_text_inline_Comment">xxx</span> xxx</div>'   282                 "text" => 
'xxx [com]xxx[/com] xxx',
   284                 "class" => 
'Headline2'   287             '<div id="1:1240" class="ilc_text_block_Headline3">xxx <span class="ilc_text_inline_Quotation">xxx</span> xxx</div>'   289                 "text" => 
'xxx [quot]xxx[/quot] xxx',
   291                 "class" => 
'Headline3'   294             '<div id="1:1241" class="ilc_text_block_Book">xxx <span class="ilc_text_inline_Accent">xxx</span> xxx</div>'   296                 "text" => 
'xxx [acc]xxx[/acc] xxx',
   301             '<div id="1:1242" class="ilc_text_block_Numbers">xxx <code>xxx</code> xxx</div>'   303                 "text" => 
'xxx [code]xxx[/code] xxx',
   308             '<div id="1:1243" class="ilc_text_block_Verse">xxx <span class="ilc_text_inline_Mnemonic">xxx</span> xxx</div>'   310                 "text" => 
'xxx [marked class="Mnemonic"]xxx[/marked] xxx',
   315             '<div id="1:1244" class="ilc_text_block_List">xxx <span class="ilc_text_inline_Attention">xxx</span> xxx</div>'   317                 "text" => 
'xxx [marked class="Attention"]xxx[/marked] xxx',
   323         foreach ($cases as $in => $expected) {
 static handleAjaxContent(string $a_content)
Handle ajax content. 
 
 
 
 
◆ testLanguage()
      
        
          | PCParagraphTest::testLanguage  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 560 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  564         $pc->create($page, 
"pg");
   565         $pc->setLanguage(
"en");
   571         $page->stripHierIDs();
   574 <PageObject><PageContent><Paragraph Language=
"en"></Paragraph></PageContent></PageObject>
   578             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testLegacyHtml2Text()
      
        
          | PCParagraphTest::testLegacyHtml2Text  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 409 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and COPageTestBase\legacyHtmlToXml().
  413         $pc->create($page, 
"pg");
   420             'test & the < and the > and the \ also'   421             => 
'test &amp; the &lt; and the &gt; and the \ also',
   422             'xxx <span class="ilc_text_inline_Strong">xxx</span> xxx'   423             => 
'xxx <Strong>xxx</Strong> xxx',
   426         foreach ($cases as $html => $expected) {
   427             $html = 
'<div id="1:1234" class="ilc_text_block_Standard">' . $html . 
'</div>';
   429             $pc->setText($xml, 
false);
   431             $expected = 
'<PageObject HierId="pg"><PageContent><Paragraph Language="">' . $expected . 
'</Paragraph></PageContent></PageObject>';
   440                 $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
legacyHtmlToXml(string $content)
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testShowLineNumbers()
      
        
          | PCParagraphTest::testShowLineNumbers  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 537 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  541         $pc->create($page, 
"pg");
   542         $pc->setLanguage(
"en");
   543         $pc->setShowLineNumbers(
"y");
   547             $pc->getShowLineNumbers()
   549         $page->stripHierIDs();
   552 <PageObject><PageContent><Paragraph Language=
"en" ShowLineNumbers=
"y"></Paragraph></PageContent></PageObject>
   556             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
◆ testSubCharacteristic()
      
        
          | PCParagraphTest::testSubCharacteristic  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 468 of file PCParagraphTest.php.
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
  472         $pc->create($page, 
"pg");
   473         $pc->setLanguage(
"en");
   474         $pc->setSubCharacteristic(
"MySubChar");
   478             $pc->getSubCharacteristic()
   480         $page->stripHierIDs();
   483 <PageObject><PageContent><Paragraph Language=
"en" SubCharacteristic=
"MySubChar"></Paragraph></PageContent></PageObject>
   487             $page->getXMLFromDom()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
 
 
 
 
The documentation for this class was generated from the following file: