mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +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);
|
||||
|
||||
$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;
|
||||
$result = $TestModel->saveField('title', '', true);
|
||||
$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');
|
||||
$Node = new Node();
|
||||
$Node->set('id', 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue