From 4261f5a9f28f780937d8a3f4c5a7fbdda1e5266b Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 25 Mar 2014 18:38:05 +0400 Subject: [PATCH] https://github.com/PHPOffice/PHPWord/issues/58 - fix for tests #2. --- tests/PhpWord/Tests/PhpWordTest.php | 2 +- tests/PhpWord/Tests/Reader/Word2007Test.php | 6 +++--- tests/bootstrap.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/PhpWord/Tests/PhpWordTest.php b/tests/PhpWord/Tests/PhpWordTest.php index 2857c4e8af..03ff2a1a9c 100644 --- a/tests/PhpWord/Tests/PhpWordTest.php +++ b/tests/PhpWord/Tests/PhpWordTest.php @@ -147,7 +147,7 @@ public function testLoadTemplateException() { $templateFqfn = \join( \DIRECTORY_SEPARATOR, - array(\PHPWORD_TESTS_BASE_DIR, 'data', 'templates', 'blanks.docx') + array(\PHPWORD_TESTS_BASE_DIR, 'Tests', 'data', 'templates', 'blanks.docx') ); $phpWord = new PhpWord(); $phpWord->loadTemplate($templateFqfn); diff --git a/tests/PhpWord/Tests/Reader/Word2007Test.php b/tests/PhpWord/Tests/Reader/Word2007Test.php index 3e94c95761..7cce388e49 100644 --- a/tests/PhpWord/Tests/Reader/Word2007Test.php +++ b/tests/PhpWord/Tests/Reader/Word2007Test.php @@ -21,7 +21,7 @@ public function testCanRead() $object = new Word2007(); $fqFilename = join( DIRECTORY_SEPARATOR, - array(PHPWORD_TESTS_BASE_DIR, '_files', 'documents', 'reader.docx') + array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'reader.docx') ); $this->assertTrue($object->canRead($fqFilename)); } @@ -34,7 +34,7 @@ public function testCanReadFailed() $object = new Word2007(); $fqFilename = join( DIRECTORY_SEPARATOR, - array(PHPWORD_TESTS_BASE_DIR, '_files', 'documents', 'foo.docx') + array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'foo.docx') ); $this->assertFalse($object->canRead($fqFilename)); $object = IOFactory::load($fqFilename); @@ -44,7 +44,7 @@ public function testLoad() { $fqFilename = join( DIRECTORY_SEPARATOR, - array(PHPWORD_TESTS_BASE_DIR, '_files', 'documents', 'reader.docx') + array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'reader.docx') ); $object = IOFactory::load($fqFilename); $this->assertInstanceOf('PhpOffice\\PhpWord\\PhpWord', $object); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index d33512729c..5240ca079f 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,7 +3,7 @@ // defining base dir for tests if (!defined('PHPWORD_TESTS_BASE_DIR')) { - define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__ . '/..')); + define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__ . '/PhpWord')); } $vendor = realpath(__DIR__ . '/../vendor');