assertTrue($object->canRead($fqFilename)); } /** * Can read exception * * @expectedException \PhpOffice\PhpWord\Exception\Exception */ public function testCanReadFailed() { $object = new Word2007(); $fqFilename = join( DIRECTORY_SEPARATOR, array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'foo.docx') ); $this->assertFalse($object->canRead($fqFilename)); $object = IOFactory::load($fqFilename); } /** * Load */ public function testLoad() { $fqFilename = join( DIRECTORY_SEPARATOR, array(PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'documents', 'reader.docx') ); $object = IOFactory::load($fqFilename); $this->assertInstanceOf('PhpOffice\\PhpWord\\PhpWord', $object); } }