assertTrue($object->canRead($filename)); } /** * Can read exception */ public function testCanReadFailed() { $object = new Word2007(); $filename = __DIR__ . '/../_files/documents/foo.docx'; $this->assertFalse($object->canRead($filename)); } /** * Load */ public function testLoad() { $filename = __DIR__ . '/../_files/documents/reader.docx'; $phpWord = IOFactory::load($filename); $this->assertInstanceOf('PhpOffice\\PhpWord\\PhpWord', $phpWord); } }