mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding test to disprove #385. Proves saveAll with validate => first behaves correctly.
This commit is contained in:
parent
be64f26f9f
commit
cc750d15f1
1 changed files with 13 additions and 0 deletions
|
@ -3067,6 +3067,19 @@ class ModelWriteTest extends BaseModelTest {
|
||||||
'attachment' => 'some_file.zip'
|
'attachment' => 'some_file.zip'
|
||||||
)));
|
)));
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
|
||||||
|
$model->Attachment->bindModel(array('belongsTo' => array('Comment')), false);
|
||||||
|
$data = array(
|
||||||
|
'Comment' => array(
|
||||||
|
'comment' => 'Comment with attachment',
|
||||||
|
'article_id' => 1,
|
||||||
|
'user_id' => 1
|
||||||
|
),
|
||||||
|
'Attachment' => array(
|
||||||
|
'attachment' => 'some_file.zip'
|
||||||
|
));
|
||||||
|
$this->assertTrue($model->saveAll($data, array('validate' => 'first')));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testSaveAllBelongsTo method
|
* testSaveAllBelongsTo method
|
||||||
|
|
Loading…
Reference in a new issue