Converting CAkeSessionTest to phpunit

This commit is contained in:
José Lorenzo Rodríguez 2010-05-13 00:21:16 -04:30
parent 6613cfb662
commit 72959e7872

View file

@ -222,7 +222,7 @@ class CakeSessionTest extends CakeTestCase {
$this->Session->write('Watching', "I'm watching you"); $this->Session->write('Watching', "I'm watching you");
$this->Session->watch('Watching'); $this->Session->watch('Watching');
$this->expectError('Writing session key {Watching}: "They found us!"'); $this->expectError();
$this->Session->write('Watching', 'They found us!'); $this->Session->write('Watching', 'They found us!');
$this->expectError('Deleting session key {Watching}'); $this->expectError('Deleting session key {Watching}');
@ -386,7 +386,7 @@ class CakeSessionTest extends CakeTestCase {
$this->assertEqual($this->Session->read('SessionTestCase'), 'This was updated'); $this->assertEqual($this->Session->read('SessionTestCase'), 'This was updated');
$this->Session->destroy(); $this->Session->destroy();
$this->assertFalse($this->Session->read('SessionTestCase')); $this->assertNull($this->Session->read('SessionTestCase'));
} }
/** /**
@ -423,7 +423,7 @@ class CakeSessionTest extends CakeTestCase {
$this->assertEqual($this->Session->read('SessionTestCase'), 'This was updated'); $this->assertEqual($this->Session->read('SessionTestCase'), 'This was updated');
$this->Session->destroy(); $this->Session->destroy();
$this->assertFalse($this->Session->read('SessionTestCase')); $this->assertNull($this->Session->read('SessionTestCase'));
} }
/** /**
@ -461,7 +461,7 @@ class CakeSessionTest extends CakeTestCase {
$this->assertEqual($this->Session->read('SessionTestCase'), 'Some additional data'); $this->assertEqual($this->Session->read('SessionTestCase'), 'Some additional data');
$this->Session->destroy(); $this->Session->destroy();
$this->assertFalse($this->Session->read('SessionTestCase')); $this->assertNull($this->Session->read('SessionTestCase'));
session_write_close(); session_write_close();
unset($_SESSION); unset($_SESSION);