Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing another test

  • Loading branch information...
commit d897ba4681ae9226bca7b0cc07ee5295ac58299a 1 parent faf710f
@lorenzo lorenzo authored
Showing with 9 additions and 14 deletions.
  1. +9 −14 tests/TestCase/View/Helper/FormHelperTest.php
View
23 tests/TestCase/View/Helper/FormHelperTest.php
@@ -1271,24 +1271,19 @@ public function testTextFieldGenerationForFloats() {
* @return void
*/
public function testTextFieldTypeNumberGenerationForIntegers() {
- $this->markTestIncomplete('Need to revisit once models work again.');
- $model->setSchema(array('foo' => array(
- 'type' => 'integer',
- 'null' => false,
- 'default' => null,
- 'length' => null
- )));
-
- $this->Form->create('Contact');
- $result = $this->Form->input('foo');
+ TableRegistry::get('Contacts', [
+ 'className' => __NAMESPACE__ . '\ContactsTable'
+ ]);
+ $this->Form->create([], ['context' => ['table' => 'Contacts']]);
+ $result = $this->Form->input('age');
$expected = array(
'div' => array('class' => 'input number'),
- 'label' => array('for' => 'ContactFoo'),
- 'Foo',
+ 'label' => array('for' => 'age'),
+ 'Age',
'/label',
array('input' => array(
- 'type' => 'number', 'name' => 'Contact[foo]',
- 'id' => 'ContactFoo'
+ 'type' => 'number', 'name' => 'age',
+ 'id' => 'age'
)),
'/div'
);
Please sign in to comment.
Something went wrong with that request. Please try again.