コード例 #1
0
ファイル: ModelWriteTest.php プロジェクト: saikais/cruise
 /**
  * test that saveAssociated 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 testSaveAssociatedEmptyData()
 {
     $this->skipIf($this->db instanceof Sqlserver, 'This test is not compatible with SQL Server.');
     $this->loadFixtures('Boat', 'ProductUpdateAll', 'Comment', 'Attachment');
     $model = new Boat();
     $result = $model->saveAssociated(array(), array('validate' => true));
     $this->assertFalse(empty($result));
     $model = new ProductUpdateAll();
     $result = $model->saveAssociated(array());
     $this->assertFalse($result);
 }