diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index 5a1b3bbae..6a3a88946 100644 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -471,6 +471,17 @@ class ModelTest extends CakeTestCase { Configure::write('debug', $this->debug); } + function testSetWithNull() { + $this->Project =& new Project(); + $expected = array('Project' => array('id' => 4, 'title' => 'My Project')); + + $this->Project->set($expected); + $this->assertEqual($this->Project->data, $expected); + + $this->Project->set(null); + $this->assertEqual($this->Project->data, $expected); + } + function testHabtmRecursiveBelongsTo() { $this->Portfolio =& new Portfolio();