ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
PCContentTemplateTest.php
Go to the documentation of this file.
1<?php
2
19use PHPUnit\Framework\TestCase;
20
25{
26 public function testConstruction(): void
27 {
28 $page = $this->getEmptyPageWithDom();
29 $pc = new ilPCContentTemplate($page);
30 $this->assertEquals(
31 ilPCContentTemplate::class,
32 get_class($pc)
33 );
34 }
35
36 /*
37 public function testCreate(): void
38 {
39 $manager = new ilUnitTestPageManager();
40 $page1 = $this->getEmptyPageWithDom(); // our template
41 $template_xml = <<<EOT
42<PageObject><PageContent><Table Language="en" DataTable="y">
43<TableRow>
44<TableData>
45<PageContent><Paragraph Language="en" Characteristic="TableContent">one</Paragraph></PageContent>
46</TableData>
47<TableData>
48<PageContent><Paragraph Language="en" Characteristic="TableContent">two</Paragraph></PageContent>
49</TableData></TableRow></Table></PageContent></PageObject>
50EOT;
51 $page1->setXMLContent($template_xml);
52 $page1->buildDom(true);
53
54 $page2 = $this->getEmptyPageWithDom(); // our target page
55 $manager->mockGet($page1);
56
57 $temp = new ilPCContentTemplate($page2, $manager);
58
59 $temp->create($page2, "pg", "", "x:1");
60 $page2->stripPCIDs();
61 $page2->stripHierIDs();
62
63 $this->assertXmlEquals(
64 $template_xml,
65 $page2->getXMLFromDom()
66 );
67 }*/
68}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...