Skip to content

Commit

Permalink
Merge pull request #69 from dbould/fix-failing-tests
Browse files Browse the repository at this point in the history
Made tests pass on non Windows OS
  • Loading branch information
geekcom authored Oct 9, 2017
2 parents 027c2ec + 3bc7ebb commit 3a02a59
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/PHPJasper/PHPJasperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,23 @@ public function testCompile()
$result = $this->PHPJasper->compile('{input_file}', '{output_file}');

$this->assertInstanceOf(PHPJasper::class, $result);
$this->assertEquals('jasperstarter compile "{input_file}" -o "{output_file}"', $result->output());

$expected = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? '' : './';
$expected .= 'jasperstarter compile "{input_file}" -o "{output_file}"';

$this->assertEquals($expected, $result->output());
}

public function testListParameters()
{
$result = $this->PHPJasper->listParameters('{input_fille}');

$this->assertInstanceOf(PHPJasper::class, $result);
$this->assertEquals('jasperstarter list_parameters "{input_fille}"', $result->output());

$expected = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? '' : './';
$expected .= 'jasperstarter list_parameters "{input_fille}"';

$this->assertEquals($expected, $result->output());
}

public function testCompileWithWrongInput()
Expand Down

0 comments on commit 3a02a59

Please sign in to comment.