Skip to content

Commit

Permalink
fix: PHPUnit test Process() format
Browse files Browse the repository at this point in the history
\Symfony\Component\Process\Process needs to be passed an array
instead of a string for the command to run, in order to sanitize
the input properly
  • Loading branch information
Michaël Dupont committed Dec 2, 2019
1 parent b8346af commit a1caa2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/PhpWord/_includes/AbstractWebServerEmbeddedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class AbstractWebServerEmbeddedTest extends \PHPUnit\Framework\TestCase
public static function setUpBeforeClass()
{
if (self::isBuiltinServerSupported()) {
self::$httpServer = new Process('php -S localhost:8080 -t tests/PhpWord/_files');
self::$httpServer = new Process(explode(' ', 'php -S localhost:8080 -t tests/PhpWord/_files'));
self::$httpServer->start();
while (!self::$httpServer->isRunning()) {
usleep(1000);
Expand Down

0 comments on commit a1caa2e

Please sign in to comment.