Skip to content
Permalink
Browse files

Add test for empty read() calls on CakeSession

  • Loading branch information...
predominant authored and markstory committed Jul 22, 2010
1 parent 623998f commit 7501fcf46dc9106e47768c54dbf4e136585d61a2
Showing with 11 additions and 1 deletion.
  1. +1 −1 cake/libs/cake_session.php
  2. +10 −0 cake/tests/cases/libs/cake_session.test.php
@@ -254,7 +254,7 @@ public static function started() {
* @param string $name Variable name to check for
* @return boolean True if variable is there
*/
public static function check($name) {
public static function check($name = null) {
if (empty($name)) {
return false;
}
@@ -194,6 +194,16 @@ function testSimpleRead() {
$this->assertEqual('value', $result);
}
/**
* testReadyEmpty
*
* @author Predominant
* @access public
*/
function testReadyEmpty() {
$this->assertFalse(TestCakeSession::read(''));
}
/**
* test writing a hash of values/
*

0 comments on commit 7501fcf

Please sign in to comment.
You can’t perform that action at this time.