From 1c3ebe1f919f0b013973da2be3a80ea95dfe2b12 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Mon, 3 Mar 2014 16:53:00 +0400 Subject: [PATCH] https://github.com/PHPOffice/PHPWord/issues/46 An attempt to fix tests. --- Tests/PHPWord/TemplateTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/PHPWord/TemplateTest.php b/Tests/PHPWord/TemplateTest.php index bd8e98e2..d80b1bbd 100644 --- a/Tests/PHPWord/TemplateTest.php +++ b/Tests/PHPWord/TemplateTest.php @@ -12,7 +12,7 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase * @covers ::applyXslStyleSheet * @test */ - public function testXslStyleSheetCanBeApplied() + final public function testXslStyleSheetCanBeApplied() { // TODO: implement after merge of the issue https://github.com/PHPOffice/PHPWord/issues/56 } @@ -23,7 +23,7 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase * @expectedExceptionMessage Could not set values for the given XSL style sheet parameters. * @test */ - public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParameterValue() + final public function testXsLStyleSheetCanNotBeAppliedOnFailureOfSettingParameterValue() { $template = new PHPWord_Template( \join(\DIRECTORY_SEPARATOR, @@ -36,7 +36,7 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'passthrough.xsl')) ); - $template->applyXslStyleSheet($xslDOMDocument, array(1 => 'somevalue')); + @$template->applyXslStyleSheet($xslDOMDocument, [1 => 'somevalue']); } /** @@ -45,7 +45,7 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase * @expectedExceptionMessage Could not load XML from the given template. * @test */ - public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromTemplate() + final public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromTemplate() { $template = new PHPWord_Template( \join(\DIRECTORY_SEPARATOR, @@ -58,7 +58,7 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'passthrough.xsl')) ); - $template->applyXslStyleSheet($xslDOMDocument); + @$template->applyXslStyleSheet($xslDOMDocument); } /** @@ -67,7 +67,7 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase * @expectedExceptionMessage Could not transform the given XML document. * @test */ - public function testXslStyleSheetCanNotBeAppliedOnFailureOfTransformation() + final public function testXslStyleSheetCanNotBeAppliedOnFailureOfTransformation() { $template = new PHPWord_Template( \join(\DIRECTORY_SEPARATOR, @@ -80,6 +80,6 @@ class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase array(\PHPWORD_TESTS_DIR_ROOT, '_files', 'xsl', 'blank.xsl')) ); - $template->applyXslStyleSheet($xslDOMDocument); + @$template->applyXslStyleSheet($xslDOMDocument); } -} +} \ No newline at end of file