Skip to content

Commit

Permalink
Merge branch '1.x' into 2.x
Browse files Browse the repository at this point in the history
* 1.x:
  Escape __DIR__ in the test suite
  • Loading branch information
fabpot committed Jun 18, 2019
2 parents 1107684 + 8c4b748 commit 14e2f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Twig/Tests/ErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ public function getErroredTemplates()

public function testTwigLeakOutputInDebugMode()
{
$output = exec(sprintf('%s %s debug', \PHP_BINARY, __DIR__.'/Fixtures/errors/leak-output.php'));
$output = exec(sprintf('%s %s debug', \PHP_BINARY, escapeshellarg(__DIR__.'/Fixtures/errors/leak-output.php')));

$this->assertSame('Hello OOPS', $output);
}

public function testDoesNotTwigLeakOutput()
{
$output = exec(sprintf('%s %s', \PHP_BINARY, __DIR__.'/Fixtures/errors/leak-output.php'));
$output = exec(sprintf('%s %s', \PHP_BINARY, escapeshellarg(__DIR__.'/Fixtures/errors/leak-output.php')));

$this->assertSame('', $output);
}
Expand Down

0 comments on commit 14e2f42

Please sign in to comment.