mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Add test for empty read() calls on CakeSession
This commit is contained in:
parent
623998f550
commit
7501fcf46d
2 changed files with 11 additions and 1 deletions
|
@ -254,7 +254,7 @@ class CakeSession {
|
|||
* @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 @@ class CakeSessionTest extends CakeTestCase {
|
|||
$this->assertEqual('value', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testReadyEmpty
|
||||
*
|
||||
* @author Predominant
|
||||
* @access public
|
||||
*/
|
||||
function testReadyEmpty() {
|
||||
$this->assertFalse(TestCakeSession::read(''));
|
||||
}
|
||||
|
||||
/**
|
||||
* test writing a hash of values/
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue