Skip to content

Commit

Permalink
cs, cleanup redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Oct 15, 2018
1 parent 2e20e71 commit 9bd24a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public static function setUpBeforeClass() {

/**
* @dataProvider testData
* @test
*/
public function testParse($input, $output) {
$res = $this->tsmarty2c($input);
Expand All @@ -43,7 +42,7 @@ public function testData() {

/**
* @dataProvider testContextData
* @test that tsmarty2c is able to parse {t context} properly
* test that tsmarty2c is able to parse {t context} properly
*/
public function testContext($input, $output) {
$res = $this->tsmarty2c($input);
Expand All @@ -70,9 +69,8 @@ private function getFiles($number) {

private function getFileName($number, $ext) {
$datadir = __DIR__ . '/data';
$file = $datadir . "/$number.$ext";

return $file;
return $datadir . "/$number.$ext";
}

private function getFile($number, $ext) {
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ protected function tsmarty2c($input) {
$cmd[] = escapeshellcmd(self::$tsmarty2c);
$cmd[] = escapeshellarg($input);

exec(join(' ', $cmd), $lines, $rc);
exec(implode(' ', $cmd), $lines, $rc);
$this->assertEquals(0, $rc, "command ran okay");
$this->assertNotEmpty($lines);

$res = join("\n", $lines);
$res = implode("\n", $lines);
$this->assertNotEmpty($res);

return $res;
Expand Down

0 comments on commit 9bd24a8

Please sign in to comment.