Adding test that thows failing behavior with null values when calling Model::set()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5822 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2007-10-20 21:09:24 +00:00
parent 0457fb9411
commit cfc6a21316

View file

@ -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();