Created
August 22, 2012 10:46
-
-
Save ptica/3424300 to your computer and use it in GitHub Desktop.
cakephp 2.2.1 Model::save doubles all numeric arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function testDoubleSave() { | |
$to_save = array( | |
'Article' => array( | |
'title' => 'title', | |
'body' => 'body', | |
), | |
'Meta' => array(10, 12), | |
); | |
$result = $this->Article->save($to_save); | |
$expected = $to_save; | |
$this->assertEquals($expected['Meta'], $result['Meta']); | |
} | |
Failed asserting that two arrays are equal. | |
--- Expected | |
+++ Actual | |
@@ @@ | |
Array ( | |
0 => 10 | |
1 => 12 | |
+ 2 => 10 | |
+ 3 => 12 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment