ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest Class Reference
+ Inheritance diagram for PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest:
+ Collaboration diagram for PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest:

Public Member Functions

 testConstruction ()
 
 testPreviewEmpty ()
 
 testPreviewPlaceholderText ()
 
 testPreviewPlaceholderMedia ()
 
 testPreviewPlaceholderQuestion ()
 

Additional Inherited Members

- Protected Member Functions inherited from COPageTestBase
 setGlobalVariable (string $name, $value)
 
 setUp ()
 
 getIdGeneratorMock ()
 
 getPCDefinition ()
 
 setPCIdCnt (int $cnt)
 
 getIDManager (\ilPageObject $page)
 
 insertParagraphAt (\ilPageObject $page, string $hier_id, string $text="")
 
 tearDown ()
 
 normalize (string $html)
 
 assertXmlEquals (string $expected_xml_as_string, string $html_xml_string)
 
 getEmptyPageWithDom ()
 
 legacyHtmlToXml (string $content)
 
 getMediaObjectMock ()
 
- Protected Attributes inherited from COPageTestBase
int $pc_cnt
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 28 of file PageLayoutTest.php.

Member Function Documentation

◆ testConstruction()

PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest::testConstruction ( )

Definition at line 30 of file PageLayoutTest.php.

30  : void
31  {
32  $layout = new \ilPageLayout(0);
33  $this->assertEquals(
34  \ilPageLayout::class,
35  get_class($layout)
36  );
37  }

◆ testPreviewEmpty()

PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest::testPreviewEmpty ( )

Definition at line 39 of file PageLayoutTest.php.

References COPageTestBase\getEmptyPageWithDom().

39  : void
40  {
41  $layout = new \ilPageLayout(0);
42 
43  $page = $this->getEmptyPageWithDom();
44 
45  $layout->setXMLContent($page->getXMLFromDom());
46 
47  $this->assertStringContainsString(
48  '<table class="il-style-layout-preview-wrapper">',
49  $layout->getPreview()
50  );
51  }
+ Here is the call graph for this function:

◆ testPreviewPlaceholderMedia()

PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest::testPreviewPlaceholderMedia ( )

Definition at line 71 of file PageLayoutTest.php.

References COPageTestBase\getEmptyPageWithDom().

71  : void
72  {
73  $layout = new \ilPageLayout(0);
74 
75  $page = $this->getEmptyPageWithDom();
76  $pc = new \ilPCPlaceHolder($page);
77  $pc->create($page, "pg");
78  $pc->setContentClass("Media");
79  $pc->setHeight("300");
80 
81  $layout->setXMLContent($page->getXMLFromDom());
82 
83  $this->assertStringContainsString(
84  'class="ilc_MediaPlaceHolderThumb"',
85  $layout->getPreview()
86  );
87  }
+ Here is the call graph for this function:

◆ testPreviewPlaceholderQuestion()

PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest::testPreviewPlaceholderQuestion ( )

Definition at line 89 of file PageLayoutTest.php.

References COPageTestBase\getEmptyPageWithDom().

89  : void
90  {
91  $layout = new \ilPageLayout(0);
92 
93  $page = $this->getEmptyPageWithDom();
94  $pc = new \ilPCPlaceHolder($page);
95  $pc->create($page, "pg");
96  $pc->setContentClass("Question");
97  $pc->setHeight("300");
98 
99  $layout->setXMLContent($page->getXMLFromDom());
100 
101  $this->assertStringContainsString(
102  'class="ilc_QuestionPlaceHolderThumb"',
103  $layout->getPreview()
104  );
105  }
+ Here is the call graph for this function:

◆ testPreviewPlaceholderText()

PHPUnit\Framework\Attributes\Test\Layout\PageLayoutTest::testPreviewPlaceholderText ( )

Definition at line 53 of file PageLayoutTest.php.

References COPageTestBase\getEmptyPageWithDom().

53  : void
54  {
55  $layout = new \ilPageLayout(0);
56 
57  $page = $this->getEmptyPageWithDom();
58  $pc = new \ilPCPlaceHolder($page);
59  $pc->create($page, "pg");
60  $pc->setContentClass("Text");
61  $pc->setHeight("300");
62 
63  $layout->setXMLContent($page->getXMLFromDom());
64 
65  $this->assertStringContainsString(
66  'class="ilc_TextPlaceHolderThumb"',
67  $layout->getPreview()
68  );
69  }
+ Here is the call graph for this function:

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