mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix failing tests.
I have no idea why the updated session test was expected to fail as the data was written to the session. Refs #3551
This commit is contained in:
parent
75495705a6
commit
0cdef75060
3 changed files with 5 additions and 2 deletions
|
@ -205,7 +205,7 @@ class SessionComponentTest extends CakeTestCase {
|
|||
$this->assertEquals($Session->read('Test'), $array);
|
||||
$Session->delete('Test');
|
||||
|
||||
$this->assertFalse($Session->write(array('Test'), 'some value'));
|
||||
$this->assertTrue($Session->write(array('Test'), 'some value'));
|
||||
$this->assertTrue($Session->write(array('Test' => 'some value')));
|
||||
$this->assertEquals('some value', $Session->read('Test'));
|
||||
$Session->delete('Test');
|
||||
|
|
|
@ -175,6 +175,9 @@ class HashTest extends CakeTestCase {
|
|||
$result = Hash::get($data, '0');
|
||||
$this->assertEquals('abc', $result);
|
||||
|
||||
$result = Hash::get($data, 0);
|
||||
$this->assertEquals('abc', $result);
|
||||
|
||||
$result = Hash::get($data, '1');
|
||||
$this->assertEquals('def', $result);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class Hash {
|
|||
if (empty($data)) {
|
||||
return null;
|
||||
}
|
||||
if (is_string($path)) {
|
||||
if (is_string($path) || is_numeric($path)) {
|
||||
$parts = explode('.', $path);
|
||||
} else {
|
||||
$parts = $path;
|
||||
|
|
Loading…
Reference in a new issue