Skip to content

Commit

Permalink
Escape __DIR__ in the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jun 11, 2019
1 parent 0390a9d commit fa0213a
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 @@ -210,14 +210,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 fa0213a

Please sign in to comment.