Skip to content
Permalink
Browse files

Fix errors in PHP <5.4

  • Loading branch information...
markstory committed Sep 7, 2015
1 parent 60d7bba commit e4cce7a44171034145b7992dae418e7cdb552bc1
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -396,7 +396,9 @@ public function testSaveFieldListResetsWhitelistOnFailedSave() {
public function testSaveUpdatedWithFieldList() {
$this->loadFixtures('Post', 'Author');
$model = ClassRegistry::init('Post');
$original = $model->find('first', ['conditions' => ['Post.id' => 1]]);
$original = $model->find('first', array(
'conditions' => array('Post.id' => 1)
));
$data = array(
'Post' => array(
'id' => 1,
@@ -405,9 +407,11 @@ public function testSaveUpdatedWithFieldList() {
)
);
$model->save($data, array(
'fieldList' => ['title']
'fieldList' => array('title')
));
$new = $model->find('first', array(
'conditions' => array('Post.id' => 1)
));
$new = $model->find('first', ['conditions' => ['Post.id' => 1]]);
$this->assertGreaterThan($original['Post']['updated'], $new['Post']['updated']);
}

0 comments on commit e4cce7a

Please sign in to comment.
You can’t perform that action at this time.