Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing another test

  • Loading branch information...
commit 104cef56266276bd8616f848d312515ba3d6f3d5 1 parent 5796ee9
José Lorenzo Rodríguez lorenzo authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 tests/TestCase/View/Helper/FormHelperTest.php
11 tests/TestCase/View/Helper/FormHelperTest.php
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.