Skip to content

Commit

Permalink
Split test method up.
Browse files Browse the repository at this point in the history
Smaller tests are easier to debug when they fail.
  • Loading branch information
markstory committed Mar 4, 2014
1 parent 918dbfc commit 4e44465
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tests/TestCase/View/Helper/FormHelperTest.php
Expand Up @@ -2498,9 +2498,8 @@ public function testInputMagicSelectChangeToRadio() {
*
* @return void
*/
public function testFormInputs() {
$this->markTestIncomplete('Need to revisit once models work again.');
$this->Form->create('Cake\Test\TestCase\View\Helper\Contact');
public function testFormInputsLegendFieldset() {
$this->Form->create($this->article);
$result = $this->Form->inputs('The Legend');
$expected = array(
'<fieldset',
Expand All @@ -2526,15 +2525,22 @@ public function testFormInputs() {

$result = $this->Form->inputs('Field of Dreams', null, array('fieldset' => 'classy-stuff'));
$this->assertTags($result, $expected);
}

$this->Form->create('Contact');
/**
* Test the inputs() method.
*
* @return void
*/
public function testFormInputs() {
$this->Form->create($this->article);
$this->Form->request['prefix'] = 'admin';
$this->Form->request['action'] = 'admin_edit';
$result = $this->Form->inputs();
$expected = array(
'<fieldset',
'<legend',
'Edit Contact',
'Edit Article',
'/legend',
'*/fieldset',
);
Expand Down

0 comments on commit 4e44465

Please sign in to comment.