mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 02:52:41 +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
|
* testReadyEmpty
|
||||||
*
|
*
|
||||||
* @author Predominant
|
* @return void
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function testReadyEmpty() {
|
function testReadyEmpty() {
|
||||||
|
@ -208,6 +208,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
* test writing a hash of values/
|
* test writing a hash of values/
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @access public
|
||||||
*/
|
*/
|
||||||
function testWriteArray() {
|
function testWriteArray() {
|
||||||
$result = TestCakeSession::write(array(
|
$result = TestCakeSession::write(array(
|
||||||
|
@ -222,6 +223,18 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
$this->assertEquals(null, TestCakeSession::read('null'));
|
$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
|
* testId method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue