File tree Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ DB_HOST=127.0.0.1
33DB_NAME = phalcon
44DB_USERNAME = root
55DB_PASSWORD = password
6+ DB_PORT = 3306
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Codeception \Lib \Connector \Phalcon4 ;
4+
5+ use Phalcon \Session \Manager ;
6+
7+ class SessionManager extends Manager
8+ {
9+ /**
10+ * We have to override this as otherwise nothing working correctly in testing.
11+ *
12+ * @return bool
13+ */
14+ public function exists (): bool
15+ {
16+ return true ;
17+ }
18+ }
Original file line number Diff line number Diff line change 1212use Codeception \Lib \Interfaces \PartedModule ;
1313use Codeception \TestInterface ;
1414use Codeception \Util \ReflectionHelper ;
15+ use Exception ;
1516use PDOException ;
1617use Phalcon \Di ;
1718use Phalcon \Di \Injectable ;
1819use Phalcon \DiInterface ;
1920use Phalcon \Mvc \Model as PhalconModel ;
2021use Phalcon \Mvc \Router \RouteInterface ;
2122use Phalcon \Mvc \RouterInterface ;
22- use Phalcon \ Session \ Manager ;
23+ use Codeception \ Lib \ Connector \ Phalcon4 \ SessionManager ;
2324use Phalcon \Url ;
2425
2526/**
@@ -152,11 +153,10 @@ public function _before(TestInterface $test)
152153
153154 if ($ this ->di ->has ('session ' )) {
154155 /** @var Manager $manager */
155- $ manager = $ this ->di ->get (Manager ::class);
156+ $ manager = $ this ->di ->get (SessionManager ::class);
156157 $ manager ->setAdapter (
157158 $ this ->di ->get ($ this ->config ['session ' ])
158159 );
159- $ manager ->start ();
160160
161161 // Destroy existing sessions of previous tests
162162 $ this ->di ['session ' ] = $ manager ;
Original file line number Diff line number Diff line change 11<?php
22
3-
43/**
54 * Inherited Methods
65 *
Original file line number Diff line number Diff line change 11<?php
22
3-
43/**
54 * Inherited Methods
65 *
Original file line number Diff line number Diff line change 11<?php
22
3-
43/**
54 * Inherited Methods
65 *
You can’t perform that action at this time.
0 commit comments