mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
More tests passing now
This commit is contained in:
parent
8700f3c7a2
commit
66a568be89
1 changed files with 1 additions and 2 deletions
|
@ -602,6 +602,7 @@ class ModelValidationTest extends BaseModelTest {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testValidatesWithModelsAndSaveAll() {
|
public function testValidatesWithModelsAndSaveAll() {
|
||||||
|
$this->loadFixtures('Something', 'SomethingElse', 'JoinThing');
|
||||||
$data = array(
|
$data = array(
|
||||||
'Something' => array(
|
'Something' => array(
|
||||||
'id' => 5,
|
'id' => 5,
|
||||||
|
@ -627,13 +628,11 @@ class ModelValidationTest extends BaseModelTest {
|
||||||
$this->assertEquals($expectedError, $JoinThing->validationErrors);
|
$this->assertEquals($expectedError, $JoinThing->validationErrors);
|
||||||
$result = $Something->validator()->validateAssociated($data);
|
$result = $Something->validator()->validateAssociated($data);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
$this->assertEquals($expectedError, $JoinThing->validator()->validationErrors);
|
|
||||||
|
|
||||||
$Something->create();
|
$Something->create();
|
||||||
$result = $Something->saveAll($data, array('validate' => 'first'));
|
$result = $Something->saveAll($data, array('validate' => 'first'));
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
$this->assertEquals($expectedError, $JoinThing->validationErrors);
|
$this->assertEquals($expectedError, $JoinThing->validationErrors);
|
||||||
$this->assertEquals($expectedError, $JoinThing->validator()->validationErrors);
|
|
||||||
|
|
||||||
$count = $Something->find('count', array('conditions' => array('Something.id' => $data['Something']['id'])));
|
$count = $Something->find('count', array('conditions' => array('Something.id' => $data['Something']['id'])));
|
||||||
$this->assertSame($count, 0);
|
$this->assertSame($count, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue