diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index f19bb9180b2..9e0b70ee067 100755 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -1175,7 +1175,6 @@ public function testFormSecurityFields() { * @return void */ public function testTextFieldGenerationForFloats() { - $this->markTestIncomplete('Need to revisit once models work again.'); $this->article['schema'] = [ 'foo' => [ 'type' => 'float', @@ -1185,17 +1184,17 @@ public function testTextFieldGenerationForFloats() { ] ]; - $this->Form->create('Contact'); + $this->Form->create($this->article); $result = $this->Form->input('foo'); $expected = array( 'div' => array('class' => 'input number'), - 'label' => array('for' => 'ContactFoo'), + 'label' => array('for' => 'foo'), 'Foo', '/label', array('input' => array( 'type' => 'number', - 'name' => 'Contact[foo]', - 'id' => 'ContactFoo', + 'name' => 'foo', + 'id' => 'foo', 'step' => 'any' )), '/div' @@ -1205,13 +1204,13 @@ public function testTextFieldGenerationForFloats() { $result = $this->Form->input('foo', array('step' => 0.5)); $expected = array( 'div' => array('class' => 'input number'), - 'label' => array('for' => 'ContactFoo'), + 'label' => array('for' => 'foo'), 'Foo', '/label', array('input' => array( 'type' => 'number', - 'name' => 'Contact[foo]', - 'id' => 'ContactFoo', + 'name' => 'foo', + 'id' => 'foo', 'step' => '0.5' )), '/div' @@ -1435,10 +1434,8 @@ public function testSecuritySubmitImageName() { * @return void */ public function testFormSecurityMultipleInputFields() { - $this->markTestIncomplete('Need to revisit once models work again.'); - $key = 'testKey'; - $this->Form->request->params['_csrfToken'] = $key; - $this->Form->create('Addresses'); + $this->Form->request->params['_Token'] = 'testKey'; + $this->Form->create(); $this->Form->hidden('Addresses.0.id', array('value' => '123456')); $this->Form->input('Addresses.0.title'); @@ -1470,7 +1467,7 @@ public function testFormSecurityMultipleInputFields() { )), array('input' => array( 'type' => 'hidden', 'name' => '_Token[unlocked]', - 'value' => '', 'id' => 'preg:/TokenUnlocked\d+/' + 'value' => '' )), '/div' );