save($file); $this->assertFileExists($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(); } }