Adding Helper test for suffixless fields

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5966 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-11-08 00:37:55 +00:00
parent 858447a184
commit 58ead8aa5c

View file

@ -128,6 +128,14 @@ class HelperTest extends UnitTestCase {
$this->assertEqual($this->View->association, null);
$this->assertEqual($this->View->fieldSuffix, null);
$this->Helper->setEntity('5.id');
$this->assertTrue($this->View->modelScope);
$this->assertEqual($this->View->model, 'HelperTestPost');
$this->assertEqual($this->View->field, 'id');
$this->assertEqual($this->View->modelId, '5');
$this->assertEqual($this->View->association, null);
$this->assertEqual($this->View->fieldSuffix, null);
$this->Helper->setEntity('5.id.time');
$this->assertTrue($this->View->modelScope);
$this->assertEqual($this->View->model, 'HelperTestPost');