Fix entity names for associated model date fields.

Fixes #1993
This commit is contained in:
mark_story 2011-09-17 12:29:21 -04:00
parent 09e7f1d491
commit 85b86cb282
2 changed files with 13 additions and 10 deletions

View file

@ -285,6 +285,10 @@ class HelperTest extends CakeTestCase {
$expected = array('HelperTestComment', 'id', 'time');
$this->assertEquals($expected, $this->Helper->entity());
$this->Helper->setEntity('HelperTestComment.created.year');
$expected = array('HelperTestComment', 'created', 'year');
$this->assertEquals($expected, $this->Helper->entity());
$this->Helper->setEntity(null);
$this->Helper->setEntity('ModelThatDoesntExist.field_that_doesnt_exist');
$expected = array('ModelThatDoesntExist', 'field_that_doesnt_exist');