Skip to content

Commit 3181010

Browse files
committed
request server should be removed before changing his definitionn
1 parent a659a18 commit 3181010

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/Codeception/Lib/Connector/Phalcon4.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
namespace Codeception\Lib\Connector;
44

55
use Closure;
6+
use Codeception\Lib\Connector\Shared\PhpSuperGlobalsConverter;
7+
use Codeception\Util\Stub;
68
use Phalcon\Di;
79
use Phalcon\Http;
8-
use RuntimeException;
9-
use ReflectionProperty;
10-
use Codeception\Util\Stub;
1110
use Phalcon\Mvc\Application;
12-
use Symfony\Component\BrowserKit\Cookie;
13-
use Symfony\Component\BrowserKit\AbstractBrowser as Client;
1411
use Phalcon\Mvc\Micro as MicroApplication;
12+
use ReflectionProperty;
13+
use RuntimeException;
14+
use Symfony\Component\BrowserKit\AbstractBrowser as Client;
15+
use Symfony\Component\BrowserKit\Cookie;
1516
use Symfony\Component\BrowserKit\Response;
16-
use Codeception\Lib\Connector\Shared\PhpSuperGlobalsConverter;
1717

1818
class Phalcon4 extends Client
1919
{
@@ -110,6 +110,9 @@ public function doRequest($request)
110110
Di::reset();
111111
Di::setDefault($di);
112112

113+
if ($di->has('request')) {
114+
$di->remove('request');
115+
}
113116
$di['request'] = Stub::construct($phRequest, [], ['getRawBody' => $request->getContent()]);
114117

115118
$response = $application->handle($pathString);

0 commit comments

Comments
 (0)