Added test for empty key write on CakeSession

This commit is contained in:
predominant 2010-07-22 19:24:11 +10:00 committed by mark_story
parent 7501fcf46d
commit f05a13a451

View file

@ -197,7 +197,7 @@ class CakeSessionTest extends CakeTestCase {
/**
* testReadyEmpty
*
* @author Predominant
* @return void
* @access public
*/
function testReadyEmpty() {
@ -208,6 +208,7 @@ class CakeSessionTest extends CakeTestCase {
* test writing a hash of values/
*
* @return void
* @access public
*/
function testWriteArray() {
$result = TestCakeSession::write(array(
@ -222,6 +223,18 @@ class CakeSessionTest extends CakeTestCase {
$this->assertEquals(null, TestCakeSession::read('null'));
}
/**
* testWriteEmptyKey
*
* @return void
* @access public
*/
function testWriteEmptyKey() {
$this->assertFalse(TestCakeSession::write('', 'graham'));
$this->assertFalse(TestCakeSession::write('', ''));
$this->assertFalse(TestCakeSession::write(''));
}
/**
* testId method
*