mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 02:22:39 +00:00
Adding assertions to model test case
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6134 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e56b92255f
commit
78b1452fca
1 changed files with 2 additions and 0 deletions
|
@ -1675,6 +1675,7 @@ class ModelTest extends CakeTestCase {
|
|||
$expected = array('Article' => array(
|
||||
'id' => '1', 'user_id' => '1', 'title' => 'New First Article', 'body' => 'First Article Body'
|
||||
));
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->model->id = 1;
|
||||
$result = $this->model->saveField('title', '');
|
||||
|
@ -1685,6 +1686,7 @@ class ModelTest extends CakeTestCase {
|
|||
$expected = array('Article' => array(
|
||||
'id' => '1', 'user_id' => '1', 'title' => '', 'body' => 'First Article Body'
|
||||
));
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->model->id = 1;
|
||||
$this->model->set('body', 'Messed up data');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue