|
|
@@ -304,7 +304,6 @@ class HelperTest extends CakeTestCase {
|
|
|
$this->assertEquals($expected, $this->Helper->entity());
|
|
|
|
|
|
$this->assertEquals('HelperTestComment', $this->Helper->model());
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -314,7 +313,11 @@ class HelperTest extends CakeTestCase {
|
|
|
* @return void
|
|
|
*/
|
|
|
public function testSetEntityAssociatedCamelCaseField() {
|
|
|
- $this->Helper->fieldset = array('HelperTestComment' => array('fields' => array('BigField' => 'something')));
|
|
|
+ $this->Helper->fieldset = array(
|
|
|
+ 'HelperTestComment' => array(
|
|
|
+ 'fields' => array('BigField' => array('type' => 'integer'))
|
|
|
+ )
|
|
|
+ );
|
|
|
$this->Helper->setEntity('HelperTestComment', true);
|
|
|
$this->Helper->setEntity('HelperTestComment.BigField');
|
|
|
|
|
|
@@ -323,6 +326,25 @@ class HelperTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Test that multiple fields work when they are camelcase and in fieldset
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testSetEntityAssociatedCamelCaseFieldHabtmMultiple() {
|
|
|
+ $this->Helper->fieldset = array(
|
|
|
+ 'HelperTestComment' => array(
|
|
|
+ 'fields' => array('Tag' => array('type' => 'multiple'))
|
|
|
+ )
|
|
|
+ );
|
|
|
+ $this->Helper->setEntity('HelperTestComment', true);
|
|
|
+ $this->Helper->setEntity('Tag');
|
|
|
+
|
|
|
+ $this->assertEquals('Tag', $this->Helper->model());
|
|
|
+ $this->assertEquals('Tag', $this->Helper->field());
|
|
|
+ $this->assertEquals(array('Tag', 'Tag'), $this->Helper->entity());
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* test that 'view' doesn't break things.
|
|
|
*
|
|
|
* @return void
|