From 670765f80f1e7fc94137dcd6c3bd6868d19c84b8 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 4 Mar 2014 14:36:39 +0400 Subject: [PATCH] https://github.com/PHPOffice/PHPWord/issues/46 Notes on error control usage were added. --- Tests/PHPWord/TemplateTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests/PHPWord/TemplateTest.php b/Tests/PHPWord/TemplateTest.php index 7ea31f64..643fa29c 100644 --- a/Tests/PHPWord/TemplateTest.php +++ b/Tests/PHPWord/TemplateTest.php @@ -36,6 +36,10 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'passthrough.xsl')) ); + /* + * We have to use error control below, because XSLTProcessor::setParameter omits warning on failure. + * This warning fails the test. + */ @$template->applyXslStyleSheet($xslDOMDocument, array(1 => 'somevalue')); } @@ -58,6 +62,10 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'passthrough.xsl')) ); + /* + * We have to use error control below, because DOMDocument::loadXML omits warning on failure. + * This warning fails the test. + */ @$template->applyXslStyleSheet($xslDOMDocument); } } \ No newline at end of file