/**
  * test that saveAll behaves like plain save() when supplied empty data
  *
  * @link https://cakephp.lighthouseapp.com/projects/42648/tickets/277-test-saveall-with-validation-returns-incorrect-boolean-when-saving-empty-data
  * @return void
  */
 public function testSaveAllEmptyData()
 {
     $this->skipIf($this->db instanceof Sqlserver, 'This test is not compatible with SQL Server.');
     $this->loadFixtures('Article', 'ProductUpdateAll', 'Comment', 'Attachment');
     $model = new Article();
     $result = $model->saveAll(array(), array('validate' => 'first'));
     $this->assertFalse(empty($result));
     $model = new ProductUpdateAll();
     $result = $model->saveAll();
     $this->assertFalse($result);
 }
Esempio n. 2
0
 /**
  * test that saveAll behaves like plain save() when suplied empty data
  *
  * @link http://cakephp.lighthouseapp.com/projects/42648/tickets/277-test-saveall-with-validation-returns-incorrect-boolean-when-saving-empty-data
  * @access public
  * @return void
  */
 function testSaveAllEmptyData()
 {
     $this->loadFixtures('Article', 'ProductUpdateAll', 'Comment', 'Attachment');
     $model = new Article();
     $result = $model->saveAll(array(), array('validate' => 'first'));
     $this->assertFalse(empty($result));
     $model = new ProductUpdateAll();
     $result = $model->saveAll(array());
     $this->assertFalse($result);
 }