Permalink
Browse files

Unskip tests for html5 inputs

HTML5 inputs are provided by the same method as text so they can be
enabled again.
  • Loading branch information...
1 parent 2f314d9 commit 359b9409a1a2efffd60d3a29bda047e3bb35b773 @markstory markstory committed Feb 14, 2014
Showing with 18 additions and 7 deletions.
  1. +18 −7 tests/TestCase/View/Helper/FormHelperTest.php
View
25 tests/TestCase/View/Helper/FormHelperTest.php
@@ -9569,45 +9569,56 @@ public function testInputTemplate() {
* @return void
*/
public function testHtml5Inputs() {
- $this->markTestIncomplete('Need to revisit once models work again.');
$result = $this->Form->email('User.email');
$expected = array(
- 'input' => array('type' => 'email', 'name' => 'User[email]', 'id' => 'UserEmail')
+ 'input' => array('type' => 'email', 'name' => 'User[email]')
);
$this->assertTags($result, $expected);
$result = $this->Form->search('User.query');
$expected = array(
- 'input' => array('type' => 'search', 'name' => 'User[query]', 'id' => 'UserQuery')
+ 'input' => array('type' => 'search', 'name' => 'User[query]')
);
$this->assertTags($result, $expected);
$result = $this->Form->search('User.query', array('value' => 'test'));
$expected = array(
- 'input' => array('type' => 'search', 'name' => 'User[query]', 'id' => 'UserQuery', 'value' => 'test')
+ 'input' => array('type' => 'search', 'name' => 'User[query]', 'value' => 'test')
);
$this->assertTags($result, $expected);
$result = $this->Form->search('User.query', array('type' => 'text', 'value' => 'test'));
$expected = array(
- 'input' => array('type' => 'text', 'name' => 'User[query]', 'id' => 'UserQuery', 'value' => 'test')
+ 'input' => array('type' => 'text', 'name' => 'User[query]', 'value' => 'test')
);
$this->assertTags($result, $expected);
+ }
- $result = $this->Form->input('User.website', array('type' => 'url', 'value' => 'http://domain.tld', 'div' => false, 'label' => false));
+/**
+ * Test accessing htm5 inputs through input().
+ *
+ * @return void
+ */
+ public function testHtml5InputWithInput() {
+ $this->markTestIncomplete('Need to revisit once models work again.');
+ $result = $this->Form->input('User.website', array(
+ 'type' => 'url',
+ 'value' => 'http://domain.tld',
+ 'div' => false,
+ 'label' => false));
$expected = array(
'input' => array('type' => 'url', 'name' => 'User[website]', 'id' => 'UserWebsite', 'value' => 'http://domain.tld')
);
$this->assertTags($result, $expected);
}
/**
+ * Test errors when field name is missing.
*
* @expectedException Cake\Error\Exception
* @return void
*/
public function testHtml5InputException() {
- $this->markTestIncomplete('Need to revisit once models work again.');
$this->Form->email();
}

0 comments on commit 359b940

Please sign in to comment.