Skip to content

Commit

Permalink
minor #3062 Escape __DIR__ in the test suite (lyrixx)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x branch.

Discussion
----------

Escape __DIR__ in the test suite

Commits
-------

fa0213a Escape __DIR__ in the test suite
  • Loading branch information
fabpot committed Jun 11, 2019
2 parents 0390a9d + fa0213a commit 8c4b748
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 8c4b748

Please sign in to comment.