Test case for incorrect population of nulls, refs #395
This commit is contained in:
parent
0d60b86e9c
commit
ada16bfb5d
1 changed files with 13 additions and 0 deletions
|
@ -147,4 +147,17 @@ class Doctrine_Hydrate_FetchMode_TestCase extends Doctrine_UnitTestCase
|
||||||
|
|
||||||
$this->assertEqual($this->conn->count(), $count + 1);
|
$this->assertEqual($this->conn->count(), $count + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testFetchArrayNull()
|
||||||
|
{
|
||||||
|
$u = new User();
|
||||||
|
$u->name = "fetch_array_test";
|
||||||
|
$u->created = null;
|
||||||
|
$u->save();
|
||||||
|
|
||||||
|
$q = new Doctrine_Query();
|
||||||
|
$q->select('u.*')->from('User u')->where('u.id = ?');
|
||||||
|
$users = $q->execute(array($u->id), Doctrine_Hydrate::HYDRATE_ARRAY);
|
||||||
|
$this->assertEqual($users[0]['created'], null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue