Skip to content

Commit

Permalink
Made tests pass on non Windows OS
Browse files Browse the repository at this point in the history
Some tests were missing the OS conditions in the domain code
  • Loading branch information
dbould committed Oct 7, 2017
1 parent 027c2ec commit 3bc7ebb
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 3bc7ebb

Please sign in to comment.