Fixing tests so they initialize the session, before trying to test things.

This commit is contained in:
mark_story 2010-12-14 21:59:53 -05:00
parent bd951791f4
commit 19f9caed28

View file

@ -143,6 +143,7 @@ class SessionComponentTest extends CakeTestCase {
*/
function testSessionIdConsistentAcrossRequestAction() {
$Session = new SessionComponent($this->ComponentCollection);
$Session->check('Test');
$this->assertTrue(isset($_SESSION));
$Object = new Object();
@ -287,6 +288,7 @@ class SessionComponentTest extends CakeTestCase {
function testSessionId() {
unset($_SESSION);
$Session = new SessionComponent($this->ComponentCollection);
$Session->check('test');
$this->assertEquals(session_id(), $Session->id());
}