save($file); $this->assertTrue(file_exists($file)); unlink($file); } /** * Test construct exception * * @expectedException \PhpOffice\PhpWord\Exception\Exception * @expectedExceptionMessage PDF rendering library or library path has not been defined. */ public function testConstructException() { $writer = new PDF(new PhpWord()); $writer->save(); } }