Skip to content

Commit

Permalink
Attempting to fix build failure in Jenkins.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 6, 2011
1 parent a0d531c commit 39c270f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/Cake/Test/Case/Model/ModelWriteTest.php
Expand Up @@ -4718,9 +4718,13 @@ public function testSaveManyValidation() {
));
$result = $TestModel->saveMany($data, array('validate' => true, 'atomic' => false));
$this->assertEqual($result, array(true, false));
$result = $TestModel->find('all', array('recursive' => -1, 'order' => 'Post.id ASC'));

$result = $TestModel->find('all', array(
'fields' => array('id', 'author_id', 'title', 'body', 'published'),
'recursive' => -1,
'order' => 'Post.id ASC'
));
$errors = array(1 => array('title' => array('This field cannot be left blank')));
$newTs = date('Y-m-d H:i:s');
$expected = array(
array(
'Post' => array(
Expand All @@ -4729,8 +4733,6 @@ public function testSaveManyValidation() {
'title' => 'Un-Baleeted First Post',
'body' => 'Not Baleeted!',
'published' => 'Y',
'created' => '2007-03-18 10:39:23',
'updated' => $newTs
)),
array(
'Post' => array(
Expand All @@ -4739,8 +4741,6 @@ public function testSaveManyValidation() {
'title' => 'Just update the title',
'body' => 'Second Post Body',
'published' => 'Y',
'created' => '2007-03-18 10:41:23',
'updated' => $ts
)),
array(
'Post' => array(
Expand All @@ -4749,8 +4749,6 @@ public function testSaveManyValidation() {
'title' => 'Third Post',
'body' => 'Third Post Body',
'published' => 'Y',
'created' => '2007-03-18 10:43:23',
'updated' => '2007-03-18 10:45:31'
)),
array(
'Post' => array(
Expand All @@ -4759,8 +4757,6 @@ public function testSaveManyValidation() {
'title' => 'Creating a fourth post',
'body' => 'Fourth post body',
'published' => 'N',
'created' => $ts,
'updated' => $ts
)));
$this->assertEqual($expected, $result);
$this->assertEqual($TestModel->validationErrors, $errors);
Expand All @@ -4779,7 +4775,11 @@ public function testSaveManyValidation() {
));
$this->assertFalse($TestModel->saveMany($data, array('validate' => 'first')));

$result = $TestModel->find('all', array('recursive' => -1, 'order' => 'Post.id ASC'));
$result = $TestModel->find('all', array(
'fields' => array('id', 'author_id', 'title', 'body', 'published'),
'recursive' => -1,
'order' => 'Post.id ASC'
));
$this->assertEqual($expected, $result);
$this->assertEqual($TestModel->validationErrors, $errors);
}
Expand Down

0 comments on commit 39c270f

Please sign in to comment.