mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing tests so they initialize the session, before trying to test things.
This commit is contained in:
parent
bd951791f4
commit
19f9caed28
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,7 @@ class SessionComponentTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
function testSessionIdConsistentAcrossRequestAction() {
|
function testSessionIdConsistentAcrossRequestAction() {
|
||||||
$Session = new SessionComponent($this->ComponentCollection);
|
$Session = new SessionComponent($this->ComponentCollection);
|
||||||
|
$Session->check('Test');
|
||||||
$this->assertTrue(isset($_SESSION));
|
$this->assertTrue(isset($_SESSION));
|
||||||
|
|
||||||
$Object = new Object();
|
$Object = new Object();
|
||||||
|
@ -287,6 +288,7 @@ class SessionComponentTest extends CakeTestCase {
|
||||||
function testSessionId() {
|
function testSessionId() {
|
||||||
unset($_SESSION);
|
unset($_SESSION);
|
||||||
$Session = new SessionComponent($this->ComponentCollection);
|
$Session = new SessionComponent($this->ComponentCollection);
|
||||||
|
$Session->check('test');
|
||||||
$this->assertEquals(session_id(), $Session->id());
|
$this->assertEquals(session_id(), $Session->id());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue