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:
mark_story 2013-01-21 21:13:35 -05:00
parent 75495705a6
commit 0cdef75060
3 changed files with 5 additions and 2 deletions

View file

@ -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');

View file

@ -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);

View file

@ -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;