Skip to content

Commit

Permalink
Unskip tests for html5 inputs
Browse files Browse the repository at this point in the history
HTML5 inputs are provided by the same method as text so they can be
enabled again.
  • Loading branch information
markstory committed Feb 14, 2014
1 parent 2f314d9 commit 359b940
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions tests/TestCase/View/Helper/FormHelperTest.php
Expand Up @@ -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();
}

Expand Down

0 comments on commit 359b940

Please sign in to comment.