File tree Expand file tree Collapse file tree 3 files changed +437
-4
lines changed Expand file tree Collapse file tree 3 files changed +437
-4
lines changed Original file line number Diff line number Diff line change 1212
1313 <filter >
1414 <whitelist >
15- <directory >src/PHPJasper</directory >
16- <directory >src/JasperStarter</directory >
15+ <directory suffix =" .php" >./src</directory >
1716 </whitelist >
1817 </filter >
1918
Original file line number Diff line number Diff line change @@ -103,6 +103,27 @@ public function testExecuteWithCompile()
103103 $ jasper = new PHPJasper ();
104104 $ jasper ->compile ('hello_world.jrxml ' )->execute ();
105105 }
106+
107+ public function testExecute ()
108+ {
109+ $ jasper = new PHPJasper ();
110+ $ actual = $ jasper ->compile (__DIR__ . '/test.jrxml ' )->execute ();
111+
112+ $ this ->assertInternalType ('array ' , $ actual );
113+ }
114+
115+ public function testResourceDirectoryException ()
116+ {
117+ $ this ->expectException (\PHPJasper \Exception \InvalidResourceDirectory::class);
118+
119+ $ jasper = new PHPJasper ();
120+ $ jasperReflection = new \ReflectionClass (get_class ($ jasper ));
121+ $ property = $ jasperReflection ->getProperty ('pathExecutable ' );
122+ $ property ->setAccessible (true );
123+ $ property ->setValue ($ jasper ,'' );
124+
125+ $ jasper ->compile (__DIR__ . '/test.jrxml ' )->execute ();
126+ }
106127
107128 public function testListParametersWithWrongInput ()
108129 {
@@ -129,11 +150,10 @@ public function testProcessWithWrongFormat()
129150 'format ' => 'mp3 '
130151 ]);
131152 }
132-
153+
133154 public function testProcess ()
134155 {
135156 $ jasper = new PHPJasper ();
136157 $ this ->assertInstanceOf (PHPJasper::class, $ jasper ->process ('hello_world.jrxml ' , "" ));
137158 }
138-
139159}
You can’t perform that action at this time.
0 commit comments