Skip to content

Commit fa0213a

Browse files
committed
Escape __DIR__ in the test suite
1 parent 0390a9d commit fa0213a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Twig/Tests/ErrorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ public function getErroredTemplates()
210210

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

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

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

222222
$this->assertSame('', $output);
223223
}

0 commit comments

Comments
 (0)