Skip to content

Commit 670765f

Browse files
author
Roman Syroeshko
committed
https://github.com/PHPOffice/PHPWord/issues/46
Notes on error control usage were added.
1 parent b765312 commit 670765f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Tests/PHPWord/TemplateTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParamete
3636
array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'passthrough.xsl'))
3737
);
3838

39+
/*
40+
* We have to use error control below, because XSLTProcessor::setParameter omits warning on failure.
41+
* This warning fails the test.
42+
*/
3943
@$template->applyXslStyleSheet($xslDOMDocument, array(1 => 'somevalue'));
4044
}
4145

@@ -58,6 +62,10 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromT
5862
array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'passthrough.xsl'))
5963
);
6064

65+
/*
66+
* We have to use error control below, because DOMDocument::loadXML omits warning on failure.
67+
* This warning fails the test.
68+
*/
6169
@$template->applyXslStyleSheet($xslDOMDocument);
6270
}
6371
}

0 commit comments

Comments
 (0)