mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
858447a184
commit
58ead8aa5c
1 changed files with 8 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue