mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 10:02:42 +00:00
Added test for empty key write on CakeSession
This commit is contained in:
parent
7501fcf46d
commit
f05a13a451
1 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue