@@ -9,11 +9,23 @@ final class PHPJasperTest extends TestCase
99 * Class PHPJasperTest
1010 *
1111 * @author Rafael Queiroz <rafaelfqf@gmail.com>
12+ * @author Daniel Rodrigues Lima ( geekcom ) <danielrodrigues-ti@hotmail.com>
1213 * @package PHPJasper
1314 */
1415{
15- private $ input = '../examples/hello_world.jrxml ' ;
16- private $ output = '../examples ' ;
16+ private $ PHPJasper ;
17+ private $ input ;
18+ private $ output ;
19+
20+ public function setUp ()
21+ {
22+ $ this ->PHPJasper = new PHPJasper ();
23+ }
24+
25+ public function tearDown ()
26+ {
27+ unset($ this ->PHPJasper );
28+ }
1729
1830 public function testConstructor ()
1931 {
@@ -22,20 +34,18 @@ public function testConstructor()
2234
2335 public function testCompile ()
2436 {
25- $ jasper = new PHPJasper ();
26- $ result = $ jasper ->compile ($ this ->input );
37+ $ result = $ this ->PHPJasper ->compile ('{input_file} ' , '{output_file} ' );
2738
2839 $ this ->assertInstanceOf (PHPJasper::class, $ result );
29- $ this ->assertEquals ('jasperstarter compile "../examples/hello_world.jrxml " ' , $ result ->output ());
40+ $ this ->assertEquals ('jasperstarter compile "{input_file}" -o "{output_file} " ' , $ result ->output ());
3041 }
3142
3243 public function testListParameters ()
3344 {
34- $ jasper = new PHPJasper ();
35- $ result = $ jasper ->listParameters ($ this ->input );
45+ $ result = $ this ->PHPJasper ->listParameters ('{input_fille} ' );
3646
3747 $ this ->assertInstanceOf (PHPJasper::class, $ result );
38- $ this ->assertEquals ('jasperstarter list_parameters "../examples/hello_world.jrxml " ' , $ result ->output ());
48+ $ this ->assertEquals ('jasperstarter list_parameters "{input_fille} " ' , $ result ->output ());
3949 }
4050
4151 /*public function testCompileWithWrongInput()
0 commit comments