40 $pc->create($page,
"pg");
42 '<PageObject HierId="pg"><PageContent><Table Language="" DataTable="y"></Table></PageContent></PageObject>',
43 $page->getXMLFromDom()
51 $pc->create($page,
"pg");
52 $row1 = $pc->addRow();
53 $pc->addCell($row1,
"one",
"en");
54 $pc->addCell($row1,
"two",
"en");
55 $row2 = $pc->addRow();
56 $pc->addCell($row2,
"three",
"en");
57 $pc->addCell($row2,
"four",
"en");
60 <PageObject HierId=
"pg"><PageContent><Table Language=
"" DataTable=
"y">
63 <PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">one</Paragraph></PageContent>
66 <PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">two</Paragraph></PageContent>
67 </TableData></TableRow>
69 <PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">three</Paragraph></PageContent>
72 <PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">four</Paragraph></PageContent>
73 </TableData></TableRow></Table></PageContent></PageObject>
78 $page->getXMLFromDom()
90 <PageObject HierId=
"pg"><PageContent HierId=
"1"><Table Language=
"" DataTable=
"y"><TableRow HierId=
"1_1"><TableData HierId=
"1_1_1"><PageContent HierId=
"1_1_1_1"><Paragraph Language=
"en" Characteristic=
"TableContent">five</Paragraph></PageContent></TableData><TableData HierId=
"1_1_2"><PageContent HierId=
"1_1_2_1"><Paragraph Language=
"en" Characteristic=
"TableContent">six</Paragraph></PageContent></TableData></TableRow><TableRow HierId=
"1_2"><TableData HierId=
"1_2_1"><PageContent HierId=
"1_2_1_1"><Paragraph Language=
"en" Characteristic=
"TableContent">seven</Paragraph></PageContent></TableData><TableData HierId=
"1_2_2"><PageContent HierId=
"1_2_2_1"><Paragraph Language=
"en" Characteristic=
"TableContent">eight</Paragraph></PageContent></TableData></TableRow></Table></PageContent></PageObject>
95 $page->getXMLFromDom()
103 $pc->create($page,
"pg");
104 $pc->setLanguage(
"en");
105 $row1 = $pc->addRow();
106 $pc->addCell($row1,
"one",
"en");
110 $cell = $pc->getCellNode(0, 0);
111 $pc->makeEmptyCell($cell->parentNode->parentNode);
112 $page->stripHierIDs();
113 $page->validateDom();
116 <PageObject><PageContent><Table Language=
"en" DataTable=
"y">
119 <PageContent><Paragraph Characteristic=
"TableContent" Language=
"en"></Paragraph></PageContent>
122 </Table></PageContent></PageObject>
127 $page->getXMLFromDom()
135 $pc->create($page,
"pg");
136 $pc->setLanguage(
"en");
137 $row1 = $pc->addRow();
138 $pc->addCell($row1,
"one",
"en");
143 $text = $pc->getCellText(0, 0);
155 $pc->create($page,
"pg");
156 $pc->setLanguage(
"en");
158 $page->validateDom();
161 <PageObject><PageContent><Table Language=
"en" DataTable=
"y"><TableRow><TableData></TableData><TableData></TableData></TableRow></Table></PageContent></PageObject>
166 $page->getXMLFromDom()
174 $pc->create($page,
"pg");
175 $pc->setLanguage(
"en");
176 $pc->importSpreadsheet(
"en",
"one\ttwo\nthree\tfour");
177 $page->validateDom();
180 <PageObject><PageContent><Table Language=
"en" DataTable=
"y"><TableRow><TableData><PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">one</Paragraph></PageContent></TableData><TableData><PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">two</Paragraph></PageContent></TableData></TableRow><TableRow><TableData><PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">three</Paragraph></PageContent></TableData><TableData><PageContent><Paragraph Language=
"en" Characteristic=
"TableContent">four</Paragraph></PageContent></TableData></TableRow></Table></PageContent></PageObject>
185 $page->getXMLFromDom()
193 $pc->create($page,
"pg");
194 $pc->setLanguage(
"fr");
196 $page->validateDom();
207 $pc->create($page,
"pg");
208 $pc->setLanguage(
"en");
210 $page->validateDom();
211 $pc->setWidth(
"200");
222 $pc->create($page,
"pg");
223 $pc->setLanguage(
"en");
225 $page->validateDom();
226 $pc->setHorizontalAlign(
"Right");
229 $pc->getHorizontalAlign()
237 $pc->create($page,
"pg");
238 $pc->setLanguage(
"en");
241 $pc->setTDWidth(
"1_1_1",
"33");
246 $pc->getAllCellWidths()
254 $pc->create($page,
"pg");
255 $pc->setLanguage(
"en");
259 [
"1_1_1:" =>
"2",
"1_1_2:" =>
"1"],
260 [
"1_1_1:" =>
"1",
"1_1_2:" =>
"1"],
263 $spans = $pc->getAllCellSpans();
267 $spans[
"1_1_1:"][
"colspan"]
271 $spans[
"1_1_1:"][
"rowspan"]
275 $spans[
"1_1_2:"][
"colspan"]
279 $spans[
"1_1_2:"][
"rowspan"]
287 $pc->create($page,
"pg");
289 0 => [0 => 2, 1 => 1]
292 0 => [0 => 1, 1 => 1]
294 $h1 = $pc->checkCellHidden(
300 $h2 = $pc->checkCellHidden(
321 $pc->create($page,
"pg");
322 $pc->setLanguage(
"en");
325 $pc->setTDClass(
"1_1_1",
"MyClass");
328 "1_1_1:" =>
"MyClass" 330 $pc->getAllCellClasses()
338 $pc->create($page,
"pg");
339 $pc->setLanguage(
"en");
342 $pc->setTDAlignment(
"1_1_1",
"Right");
347 $pc->getAllCellAlignments()
355 $pc->create($page,
"pg");
356 $pc->setLanguage(
"en");
360 $pc->setCaption(
"Moin",
"Top");
367 $pc->getCaptionAlign()
375 $pc->create($page,
"pg");
376 $pc->setLanguage(
"en");
379 $pc->setFirstRowStyle(
"MyClass");
382 '1_1_1:' =>
'MyClass',
383 '1_1_2:' =>
'MyClass',
387 $pc->getAllCellClasses()
395 $pc->create($page,
"pg");
396 $pc->setLanguage(
"en");
400 $pc->setClass(
"MyClass");
411 $pc->create($page,
"pg");
412 $pc->setLanguage(
"en");
416 $pc->setTemplate(
"MyTemplate");
427 $pc->create($page,
"pg");
428 $pc->setHeaderRows(2);
439 $pc->create($page,
"pg");
440 $pc->setFooterRows(2);
451 $pc->create($page,
"pg");
452 $pc->setHeaderCols(2);
463 $pc->create($page,
"pg");
464 $pc->setFooterCols(2);
475 $pc->create($page,
"pg");
476 $pc->setLanguage(
"en");
477 $pc->importSpreadsheet(
"en",
"one\ttwo\nthree\tfour");
482 $expected = new \stdClass();
483 $expected->content = [
493 $expected->characteristic =
'';
494 $expected->template =
'';
495 $expected->hasHeaderRows =
false;
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)