File tree Expand file tree Collapse file tree 2 files changed +428
-2
lines changed Expand file tree Collapse file tree 2 files changed +428
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,19 @@ public function testExecuteWithCompile()
103103 $ jasper = new PHPJasper ();
104104 $ jasper ->compile ('hello_world.jrxml ' )->execute ();
105105 }
106+
107+ public function testResourceDirectoryException ()
108+ {
109+ $ this ->expectException (\PHPJasper \Exception \InvalidResourceDirectory::class);
110+
111+ $ jasper = new PHPJasper ();
112+ $ jasperReflection = new \ReflectionClass (get_class ($ jasper ));
113+ $ property = $ jasperReflection ->getProperty ('pathExecutable ' );
114+ $ property ->setAccessible (true );
115+ $ property ->setValue ($ jasper ,'' );
116+
117+ $ jasper ->compile (__DIR__ . '/test.jrxml ' )->execute ();
118+ }
106119
107120 public function testListParametersWithWrongInput ()
108121 {
@@ -129,11 +142,10 @@ public function testProcessWithWrongFormat()
129142 'format ' => 'mp3 '
130143 ]);
131144 }
132-
145+
133146 public function testProcess ()
134147 {
135148 $ jasper = new PHPJasper ();
136149 $ this ->assertInstanceOf (PHPJasper::class, $ jasper ->process ('hello_world.jrxml ' , "" ));
137150 }
138-
139151}
You can’t perform that action at this time.
0 commit comments