From 104cef56266276bd8616f848d312515ba3d6f3d5 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sun, 23 Feb 2014 23:09:06 +0100 Subject: [PATCH] Fixing another test --- tests/TestCase/View/Helper/FormHelperTest.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index c7d99d929b3..1d7e68d1ccd 100755 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -543,6 +543,7 @@ public function setUp() { public function tearDown() { parent::tearDown(); unset($this->Form->Html, $this->Form, $this->Controller, $this->View); + TableRegistry::clear(); } /** @@ -2662,13 +2663,15 @@ public function testInputCustomization() { * @return void */ public function testInputZero() { - $this->markTestIncomplete('Need to revisit once models work again.'); - $this->Form->create('User'); + TableRegistry::get('Contacts', [ + 'className' => __NAMESPACE__ . '\ContactsTable' + ]); + $this->Form->create([], ['context' => ['table' => 'Contacts']]); $result = $this->Form->input('0'); $expected = array( 'div' => array('class' => 'input text'), - 'label' => array('for' => 'User0'), '/label', - 'input' => array('type' => 'text', 'name' => 'User[0]', 'id' => 'User0'), + 'label' => array('for' => '0'), '/label', + 'input' => array('type' => 'text', 'name' => '0', 'id' => '0'), '/div' ); $this->assertTags($result, $expected);