◆ testCommasWillBeConvertedToPointInDecimalSepartor()
ilXlsFoParserTest::testCommasWillBeConvertedToPointInDecimalSepartor |
( |
| ) |
|
Definition at line 271 of file ilXlsFoParserTest.php.
References $language, and Sabre\VObject\$output.
274 'certificate_text' =>
'<xml> Some Context </xml>',
275 'margin_body' => array(
281 'pageformat' =>
'custom',
282 'pagewidth' =>
'210mm',
283 'pageheight' =>
'297mm' 286 $settings = $this->getMockBuilder(
'ilSetting')
287 ->disableOriginalConstructor()
290 $settings->method(
'get')
291 ->willReturn(
'Something');
293 $pageFormats = $this->getMockBuilder(
'ilPageFormats')
294 ->disableOriginalConstructor()
297 $pageFormats->method(
'fetchPageFormats')
307 $xmlChecker = $this->getMockBuilder(
'ilXMLChecker')
310 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
313 $utilHelper->method(
'stripSlashes')
314 ->willReturnOnConsecutiveCalls(
323 $xlstProcess = $this->getMockBuilder(
'ilCertificateXlstProcess')
326 $xlstProcess->method(
'process')
329 '/_xml' =>
'<html><body><xml> Some Context </xml></body></html>',
330 '/_xsl' =>
'<xml>Some XLS Content</xml>' 333 'pageheight' =>
'29.7mm',
334 'pagewidth' =>
'21.0mm',
335 'backgroundimage' =>
'[BACKGROUND_IMAGE]',
336 'marginbody' =>
'1cm 2cm 3cm 4cm' 339 ->willReturn(
'Something Processed');
341 $language = $this->getMockBuilder(
'ilLanguage')
342 ->disableOriginalConstructor()
345 $certificateXlsFileLoader = $this->getMockBuilder(
'ilCertificateXlsFileLoader')
348 $certificateXlsFileLoader->method(
'getXlsCertificateContent')
349 ->willReturn(
'<xml>Some XLS Content</xml>');
358 $certificateXlsFileLoader
361 $output = $xlsFoParser->parse($formData);
363 $this->assertEquals(
'Something Processed',
$output);
◆ testParseButXmlCheckerFindsAnError()
ilXlsFoParserTest::testParseButXmlCheckerFindsAnError |
( |
| ) |
|
Exception
Definition at line 105 of file ilXlsFoParserTest.php.
References $language.
108 'certificate_text' =>
'<xml> Some Context </xml>',
109 'margin_body' => array(
115 'pageformat' =>
'custom' 118 $settings = $this->getMockBuilder(
'ilSetting')
119 ->disableOriginalConstructor()
122 $settings->method(
'get')
123 ->willReturn(
'Something');
125 $pageFormats = $this->getMockBuilder(
'ilPageFormats')
126 ->disableOriginalConstructor()
129 $pageFormats->method(
'fetchPageFormats')
139 $xmlChecker = $this->getMockBuilder(
'ilXMLChecker')
142 $xmlChecker->method(
'hasError')
145 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
148 $xlstProcess = $this->getMockBuilder(
'ilCertificateXlstProcess')
151 $language = $this->getMockBuilder(
'ilLanguage')
152 ->disableOriginalConstructor()
155 $certificateXlsFileLoader = $this->getMockBuilder(
'ilCertificateXlsFileLoader')
158 $certificateXlsFileLoader->method(
'getXlsCertificateContent')
159 ->willReturn(
'<xml>Some XLS Content</xml>');
168 $certificateXlsFileLoader
171 $xlsFoParser->parse($formData);
◆ testParseWithCustomPageFormatting()
ilXlsFoParserTest::testParseWithCustomPageFormatting |
( |
| ) |
|
Definition at line 176 of file ilXlsFoParserTest.php.
References $language, and Sabre\VObject\$output.
179 'certificate_text' =>
'<xml> Some Context </xml>',
180 'margin_body' => array(
186 'pageformat' =>
'custom',
187 'pagewidth' =>
'210mm',
188 'pageheight' =>
'297mm' 191 $settings = $this->getMockBuilder(
'ilSetting')
192 ->disableOriginalConstructor()
195 $settings->method(
'get')
196 ->willReturn(
'Something');
198 $pageFormats = $this->getMockBuilder(
'ilPageFormats')
199 ->disableOriginalConstructor()
202 $pageFormats->method(
'fetchPageFormats')
212 $xmlChecker = $this->getMockBuilder(
'ilXMLChecker')
215 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
218 $utilHelper->method(
'stripSlashes')
219 ->willReturnOnConsecutiveCalls(
228 $xlstProcess = $this->getMockBuilder(
'ilCertificateXlstProcess')
231 $xlstProcess->method(
'process')
234 '/_xml' =>
'<html><body><xml> Some Context </xml></body></html>',
235 '/_xsl' =>
'<xml>Some XLS Content</xml>' 238 'pageheight' =>
'297mm',
239 'pagewidth' =>
'210mm',
240 'backgroundimage' =>
'[BACKGROUND_IMAGE]',
241 'marginbody' =>
'1cm 2cm 3cm 4cm' 244 ->willReturn(
'Something Processed');
246 $language = $this->getMockBuilder(
'ilLanguage')
247 ->disableOriginalConstructor()
250 $certificateXlsFileLoader = $this->getMockBuilder(
'ilCertificateXlsFileLoader')
253 $certificateXlsFileLoader->method(
'getXlsCertificateContent')
254 ->willReturn(
'<xml>Some XLS Content</xml>');
263 $certificateXlsFileLoader
266 $output = $xlsFoParser->parse($formData);
268 $this->assertEquals(
'Something Processed',
$output);
◆ testParseWithNonCustomPageFormatting()
ilXlsFoParserTest::testParseWithNonCustomPageFormatting |
( |
| ) |
|
Definition at line 9 of file ilXlsFoParserTest.php.
References $language, and Sabre\VObject\$output.
12 'certificate_text' =>
'<xml> Some Context </xml>',
13 'margin_body' => array(
22 $settings = $this->getMockBuilder(
'ilSetting')
23 ->disableOriginalConstructor()
26 $settings->method(
'get')
27 ->willReturn(
'Something');
29 $pageFormats = $this->getMockBuilder(
'ilPageFormats')
30 ->disableOriginalConstructor()
33 $pageFormats->method(
'fetchPageFormats')
43 $xmlChecker = $this->getMockBuilder(
'ilXMLChecker')
46 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
49 $utilHelper->method(
'stripSlashes')
50 ->willReturnOnConsecutiveCalls(
59 $xlstProcess = $this->getMockBuilder(
'ilCertificateXlstProcess')
62 $xlstProcess->method(
'process')
65 '/_xml' =>
'<html><body><xml> Some Context </xml></body></html>',
66 '/_xsl' =>
'<xml>Some XLS Content</xml>' 69 'pageheight' =>
'297mm',
70 'pagewidth' =>
'210mm',
71 'backgroundimage' =>
'[BACKGROUND_IMAGE]',
72 'marginbody' =>
'1cm 2cm 3cm 4cm' 75 ->willReturn(
'Something Processed');
77 $language = $this->getMockBuilder(
'ilLanguage')
78 ->disableOriginalConstructor()
81 $certificateXlsFileLoader = $this->getMockBuilder(
'ilCertificateXlsFileLoader')
84 $certificateXlsFileLoader->method(
'getXlsCertificateContent')
85 ->willReturn(
'<xml>Some XLS Content</xml>');
94 $certificateXlsFileLoader
97 $output = $xlsFoParser->parse($formData);
99 $this->assertEquals(
'Something Processed',
$output);
The documentation for this class was generated from the following file: