mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
Fixing a few failing tests, and splitting a big test into two smaller ones.
This commit is contained in:
parent
4e9d76e806
commit
59ea917c23
1 changed files with 14 additions and 6 deletions
|
@ -216,18 +216,26 @@ class CakeSessionTest extends CakeTestCase {
|
|||
/**
|
||||
* testWatchVar method
|
||||
*
|
||||
* @expectedException Exception
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function testWatchVar() {
|
||||
function testWatchVarWrite() {
|
||||
$this->assertFalse(TestCakeSession::watch(null));
|
||||
|
||||
TestCakeSession::write('Watching', "I'm watching you");
|
||||
TestCakeSession::watch('Watching');
|
||||
$this->expectError('Writing session key {Watching}: "They found us!"');
|
||||
TestCakeSession::write('Watching', 'They found us!');
|
||||
}
|
||||
|
||||
$this->expectError('Deleting session key {Watching}');
|
||||
/**
|
||||
* undocumented function
|
||||
*
|
||||
* @expectedException Exception
|
||||
* @return void
|
||||
*/
|
||||
function testWatchVarDelete() {
|
||||
TestCakeSession::watch('Watching');
|
||||
TestCakeSession::delete('Watching');
|
||||
|
||||
$this->assertFalse(TestCakeSession::watch('Invalid.key'));
|
||||
|
@ -392,7 +400,7 @@ class CakeSessionTest extends CakeTestCase {
|
|||
$this->assertEqual(TestCakeSession::read('SessionTestCase'), 'This was updated');
|
||||
|
||||
TestCakeSession::destroy();
|
||||
$this->assertFalse(TestCakeSession::read('SessionTestCase'));
|
||||
$this->assertNull(TestCakeSession::read('SessionTestCase'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -428,7 +436,7 @@ class CakeSessionTest extends CakeTestCase {
|
|||
$this->assertEqual(TestCakeSession::read('SessionTestCase'), 'This was updated');
|
||||
|
||||
TestCakeSession::destroy();
|
||||
$this->assertFalse(TestCakeSession::read('SessionTestCase'));
|
||||
$this->assertNull(TestCakeSession::read('SessionTestCase'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -464,7 +472,7 @@ class CakeSessionTest extends CakeTestCase {
|
|||
$this->assertEqual(TestCakeSession::read('SessionTestCase'), 'Some additional data');
|
||||
|
||||
TestCakeSession::destroy();
|
||||
$this->assertFalse(TestCakeSession::read('SessionTestCase'));
|
||||
$this->assertNull(TestCakeSession::read('SessionTestCase'));
|
||||
session_write_close();
|
||||
|
||||
unset($_SESSION);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue