From aa6a2096fe2f51060a7f04c04a06f95263b461ce Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Fri, 28 Jun 2019 18:46:54 +0100 Subject: [PATCH] Revert "Fixing phalcon serve on newer PHP versions - issue #1233" --- scripts/Phalcon/Commands/Builtin/Serve.php | 4 ++-- tests/unit/ServeTest.php | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Phalcon/Commands/Builtin/Serve.php b/scripts/Phalcon/Commands/Builtin/Serve.php index db88d8b58..cad56456d 100644 --- a/scripts/Phalcon/Commands/Builtin/Serve.php +++ b/scripts/Phalcon/Commands/Builtin/Serve.php @@ -127,12 +127,12 @@ public function shellCommand() $this->printServerDetails(); return sprintf( - '%s -S %s:%s -t %s -t %s %s', + '%s -S %s:%s -t %s %s %s', $binary_path, $this->hostname, $this->port, - $this->base_path, $this->document_root, + $this->base_path, $this->config ); } diff --git a/tests/unit/ServeTest.php b/tests/unit/ServeTest.php index 76e4f0ce8..098dc2461 100644 --- a/tests/unit/ServeTest.php +++ b/tests/unit/ServeTest.php @@ -69,7 +69,7 @@ public function testGeneratedCommandWithNoParameters() $_SERVER['argv'] = ['','']; $this->command->parseParameters([], []); $command = $this->command->shellCommand(); - $this->assertContains('php -S 0.0.0.0:8000 -t .htrouter.php -t public', $command); + $this->assertContains('php -S 0.0.0.0:8000 -t public .htrouter.php', $command); } /** @@ -103,7 +103,7 @@ public function testGeneratedCommandWithHostnameOnly() $_SERVER['argv'] = ['','', 'localhost']; $this->command->parseParameters([], []); $command = $this->command->shellCommand(); - $this->assertContains('php -S localhost:8000 -t .htrouter.php -t public', $command); + $this->assertContains('php -S localhost:8000 -t public .htrouter.php', $command); } /** @@ -137,7 +137,7 @@ public function testGeneratedCommandWithPortOnly() $_SERVER['argv'] = ['','', null, 1111]; $this->command->parseParameters([], []); $command = $this->command->shellCommand(); - $this->assertContains('php -S 0.0.0.0:1111 -t .htrouter.php -t public', $command); + $this->assertContains('php -S 0.0.0.0:1111 -t public .htrouter.php', $command); } /** @@ -171,7 +171,7 @@ public function testGeneratedCommandWithBasepathOnly() $_SERVER['argv'] = ['','', null, null, '/root/bin.php']; $this->command->parseParameters([], []); $command = $this->command->shellCommand(); - $this->assertContains('php -S 0.0.0.0:8000 -t /root/bin.php -t public', $command); + $this->assertContains('php -S 0.0.0.0:8000 -t public /root/bin.php', $command); } /** @@ -205,7 +205,7 @@ public function testGeneratedCommandWithDocumentRootOnly() $_SERVER['argv'] = ['','', null, null, null, 'not_too_public']; $this->command->parseParameters([], []); $command = $this->command->shellCommand(); - $this->assertContains('php -S 0.0.0.0:8000 -t .htrouter.php -t not_too_public', $command); + $this->assertContains('php -S 0.0.0.0:8000 -t not_too_public .htrouter.php', $command); } /** @@ -239,6 +239,6 @@ public function testGeneratedCommandWithConfigOnly() $_SERVER['argv'] = ['','', null, null, null, '--config=awesome.ini']; $this->command->parseParameters([], []); $command = $this->command->shellCommand(); - $this->assertContains('php -S 0.0.0.0:8000 -t .htrouter.php -t public -c awesome.ini', $command); + $this->assertContains('php -S 0.0.0.0:8000 -t public .htrouter.php -c awesome.ini', $command); } }