File tree 3 files changed +437
-4
lines changed
3 files changed +437
-4
lines changed Original file line number Diff line number Diff line change 12
12
13
13
<filter >
14
14
<whitelist >
15
- <directory >src/PHPJasper</directory >
16
- <directory >src/JasperStarter</directory >
15
+ <directory suffix =" .php" >./src</directory >
17
16
</whitelist >
18
17
</filter >
19
18
Original file line number Diff line number Diff line change @@ -103,6 +103,27 @@ public function testExecuteWithCompile()
103
103
$ jasper = new PHPJasper ();
104
104
$ jasper ->compile ('hello_world.jrxml ' )->execute ();
105
105
}
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
+ }
106
127
107
128
public function testListParametersWithWrongInput ()
108
129
{
@@ -129,11 +150,10 @@ public function testProcessWithWrongFormat()
129
150
'format ' => 'mp3 '
130
151
]);
131
152
}
132
-
153
+
133
154
public function testProcess ()
134
155
{
135
156
$ jasper = new PHPJasper ();
136
157
$ this ->assertInstanceOf (PHPJasper::class, $ jasper ->process ('hello_world.jrxml ' , "" ));
137
158
}
138
-
139
159
}
You can’t perform that action at this time.
0 commit comments