mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
parent
b8e27c7588
commit
dbece1f157
1 changed files with 15 additions and 1 deletions
|
@ -611,12 +611,26 @@ class ModelWriteTest extends BaseModelTest {
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
$TestModel->recursive = -1;
|
$TestModel->recursive = -1;
|
||||||
$result = $TestModel->read(array('id', 'user_id', 'title', 'body'), 1);
|
$TestModel->read(array('id', 'user_id', 'title', 'body'), 1);
|
||||||
|
|
||||||
$TestModel->id = 1;
|
$TestModel->id = 1;
|
||||||
$result = $TestModel->saveField('title', '', true);
|
$result = $TestModel->saveField('title', '', true);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
|
||||||
|
|
||||||
|
$TestModel->recursive = -1;
|
||||||
|
$TestModel->id = 1;
|
||||||
|
$result = $TestModel->saveField('user_id', 9999);
|
||||||
|
$this->assertTrue((bool)$result);
|
||||||
|
|
||||||
|
$result = $TestModel->read(array('id', 'user_id'), 1);
|
||||||
|
$expected = array('Article' => array(
|
||||||
|
'id' => '1',
|
||||||
|
'user_id' => '9999',
|
||||||
|
));
|
||||||
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
|
|
||||||
$this->loadFixtures('Node', 'Dependency');
|
$this->loadFixtures('Node', 'Dependency');
|
||||||
$Node = new Node();
|
$Node = new Node();
|
||||||
$Node->set('id', 1);
|
$Node->set('id', 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue