mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
0457fb9411
commit
cfc6a21316
1 changed files with 11 additions and 0 deletions
|
@ -471,6 +471,17 @@ class ModelTest extends CakeTestCase {
|
||||||
Configure::write('debug', $this->debug);
|
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() {
|
function testHabtmRecursiveBelongsTo() {
|
||||||
$this->Portfolio =& new Portfolio();
|
$this->Portfolio =& new Portfolio();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue