Skip to content

Commit 765bd99

Browse files
authored
Merge pull request #49 from PHPJasper/php7
update tests
2 parents a664b07 + 59dd14f commit 765bd99

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/geekcom/phpjasper/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/geekcom/phpjasper/?branch=master)
33
[![StyleCI](https://styleci.io/repos/46984485/shield?branch=master)](https://styleci.io/repos/46984485)
44
[![Latest Stable Version](https://poser.pugx.org/geekcom/phpjasper/v/stable)](https://packagist.org/packages/geekcom/phpjasper)
5-
[![Total Downloads](https://poser.pugx.org/geekcom/phpjasper/downloads)](https://packagist.org/packages/geekcom/phpjasper)
5+
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-blue.svg?style=flat-square)](https://php.net/)
66
[![License](https://poser.pugx.org/geekcom/phpjasper/license)](https://packagist.org/packages/geekcom/phpjasper)
7-
[![Bitcoin Donations](https://img.shields.io/badge/bitcoin-donation-orange.svg)](https://blockchain.info/address/1LqwqcMfNuNzq6S671z1HjM61MpBuFCGqg)
87

98
### Docs
109
[![Language-pt_BR](https://img.shields.io/badge/pt__BR-100%25-green.svg)](https://github.com/PHPJasper/phpjasper/blob/master/docs/pt_BR/LEIA-ME_pt_BR.md)

docs/pt_BR/LEIA-ME_pt_BR.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/geekcom/phpjasper/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/geekcom/phpjasper/?branch=master)
44
[![StyleCI](https://styleci.io/repos/46984485/shield?branch=master)](https://styleci.io/repos/46984485)
55
[![Latest Stable Version](https://poser.pugx.org/geekcom/phpjasper/v/stable)](https://packagist.org/packages/geekcom/phpjasper)
6-
[![Total Downloads](https://poser.pugx.org/geekcom/phpjasper/downloads)](https://packagist.org/packages/geekcom/phpjasper)
6+
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-blue.svg?style=flat-square)](https://php.net/)
77
[![License](https://poser.pugx.org/geekcom/phpjasper/license)](https://packagist.org/packages/geekcom/phpjasper)
8-
[![Bitcoin Donations](https://img.shields.io/badge/bitcoin-donation-orange.svg)](https://blockchain.info/address/1LqwqcMfNuNzq6S671z1HjM61MpBuFCGqg)
98

109
### Documentação
1110
[![Language-en_US](https://img.shields.io/badge/en__US-100%25-green.svg)](https://github.com/PHPJasper/phpjasper/blob/master/README.md)

tests/PHPJasper/PHPJasperTest.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ final class PHPJasperTest extends TestCase
99
* Class PHPJasperTest
1010
*
1111
* @author Rafael Queiroz <[email protected]>
12+
* @author Daniel Rodrigues Lima ( geekcom ) <[email protected]>
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

Comments
 (0)