Permalink
Browse files

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
  • Loading branch information...
markstory committed Jan 22, 2013
1 parent 7549570 commit 0cdef75060d4eee0f28cddb2cf3260ac8cc8a907
@@ -205,7 +205,7 @@ public function testSessionReadWrite() {
$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 @@ public function testGet() {
$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 @@ public static function get(array $data, $path) {
if (empty($data)) {
return null;
}
if (is_string($path)) {
if (is_string($path) || is_numeric($path)) {
$parts = explode('.', $path);
} else {
$parts = $path;

0 comments on commit 0cdef75

Please sign in to comment.