Merge pull request #175 from RomanSyroeshko/develop

Fix for tests #3.
This commit is contained in:
Roman Syroeshko 2014-03-25 09:00:38 -07:00
commit 31dc246cfb
3 changed files with 6 additions and 6 deletions

View File

@ -147,7 +147,7 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
{
$templateFqfn = \join(
\DIRECTORY_SEPARATOR,
array(\PHPWORD_TESTS_BASE_DIR, 'Tests', 'data', 'templates', 'blanks.docx')
array(\PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', 'data', 'templates', 'blanks.docx')
);
$phpWord = new PhpWord();
$phpWord->loadTemplate($templateFqfn);

View File

@ -21,7 +21,7 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
$object = new Word2007();
$fqFilename = join(
DIRECTORY_SEPARATOR,
array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'reader.docx')
array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'reader.docx')
);
$this->assertTrue($object->canRead($fqFilename));
}
@ -34,7 +34,7 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
$object = new Word2007();
$fqFilename = join(
DIRECTORY_SEPARATOR,
array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'foo.docx')
array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'foo.docx')
);
$this->assertFalse($object->canRead($fqFilename));
$object = IOFactory::load($fqFilename);
@ -44,9 +44,9 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
{
$fqFilename = join(
DIRECTORY_SEPARATOR,
array(PHPWORD_TESTS_BASE_DIR, 'Tests', '_files', 'documents', 'reader.docx')
array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'reader.docx')
);
$object = IOFactory::load($fqFilename);
$this->assertInstanceOf('PhpOffice\\PhpWord\\PhpWord', $object);
}
}
}

View File

@ -3,7 +3,7 @@ date_default_timezone_set('UTC');
// defining base dir for tests
if (!defined('PHPWORD_TESTS_BASE_DIR')) {
define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__ . '/PhpWord'));
define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__ . '/..'));
}
$vendor = realpath(__DIR__ . '/../vendor');