Skip to content

Commit 31dc246

Browse files
Roman SyroeshkoRoman Syroeshko
Roman Syroeshko
authored and
Roman Syroeshko
committed
Merge pull request #175 from RomanSyroeshko/develop
Fix for tests #3.
2 parents e607c3f + efa77ef commit 31dc246

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/PhpWord/Tests/PhpWordTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function testLoadTemplateException()
147147
{
148148
$templateFqfn = \join(
149149
\DIRECTORY_SEPARATOR,
150-
array(\PHPWORD_TESTS_BASE_DIR, 'Tests', 'data', 'templates', 'blanks.docx')
150+
array(\PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', 'data', 'templates', 'blanks.docx')
151151
);
152152
$phpWord = new PhpWord();
153153
$phpWord->loadTemplate($templateFqfn);

tests/PhpWord/Tests/Reader/Word2007Test.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testCanRead()
2121
$object = new Word2007();
2222
$fqFilename = join(
2323
DIRECTORY_SEPARATOR,
24-
array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'reader.docx')
24+
array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'reader.docx')
2525
);
2626
$this->assertTrue($object->canRead($fqFilename));
2727
}
@@ -34,7 +34,7 @@ public function testCanReadFailed()
3434
$object = new Word2007();
3535
$fqFilename = join(
3636
DIRECTORY_SEPARATOR,
37-
array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'foo.docx')
37+
array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'foo.docx')
3838
);
3939
$this->assertFalse($object->canRead($fqFilename));
4040
$object = IOFactory::load($fqFilename);
@@ -44,9 +44,9 @@ public function testLoad()
4444
{
4545
$fqFilename = join(
4646
DIRECTORY_SEPARATOR,
47-
array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'reader.docx')
47+
array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'reader.docx')
4848
);
4949
$object = IOFactory::load($fqFilename);
5050
$this->assertInstanceOf('PhpOffice\\PhpWord\\PhpWord', $object);
5151
}
52-
}
52+
}

tests/bootstrap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// defining base dir for tests
55
if (!defined('PHPWORD_TESTS_BASE_DIR')) {
6-
define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__ . '/PhpWord'));
6+
define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__ . '/..'));
77
}
88

99
$vendor = realpath(__DIR__ . '/../vendor');

0 commit comments

Comments
 (0)