Skip to content
Permalink
Browse files

Remove redundant test.

This test is redundant as the create/update logic is part of the context
classes now.
  • Loading branch information...
markstory committed Feb 26, 2014
1 parent 450d3c1 commit 89ef6479539fadbe4e98907d008ba3df2a14504c
Showing with 0 additions and 69 deletions.
  1. +0 −69 tests/TestCase/View/Helper/FormHelperTest.php
@@ -7348,73 +7348,4 @@ public function testRequiredAttribute() {
$this->assertContains('required', $result);
}
/**
* Tests that the 'on' key validates as expected on update
*
* @return void
*/
public function testRequiredOnUpdate() {
$this->markTestIncomplete('Need to revisit once models work again.');
$this->Form->request->data['Contact']['id'] = 1;
$this->Form->create('Contact');
$result = $this->Form->input('Contact.imrequiredonupdate');
$expected = array(
'div' => array('class' => 'input text required'),
'label' => array('for' => 'ContactImrequiredonupdate'),
'Imrequiredonupdate',
'/label',
'input' => array(
'type' => 'text', 'name' => 'Contact[imrequiredonupdate]',
'id' => 'ContactImrequiredonupdate',
'required' => 'required'
),
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Contact.imrequiredoncreate');
$expected = array(
'div' => array('class' => 'input text'),
'label' => array('for' => 'ContactImrequiredoncreate'),
'Imrequiredoncreate',
'/label',
'input' => array(
'type' => 'text', 'name' => 'Contact[imrequiredoncreate]',
'id' => 'ContactImrequiredoncreate'
),
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Contact.imrequiredonboth');
$expected = array(
'div' => array('class' => 'input text required'),
'label' => array('for' => 'ContactImrequiredonboth'),
'Imrequiredonboth',
'/label',
'input' => array(
'type' => 'text', 'name' => 'Contact[imrequiredonboth]',
'id' => 'ContactImrequiredonboth',
'required' => 'required'
),
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Contact.imrequired');
$expected = array(
'div' => array('class' => 'input text required'),
'label' => array('for' => 'ContactImrequired'),
'Imrequired',
'/label',
'input' => array(
'type' => 'text', 'name' => 'Contact[imrequired]',
'id' => 'ContactImrequired',
'required' => 'required'
),
'/div'
);
$this->assertTags($result, $expected);
}
}

0 comments on commit 89ef647

Please sign in to comment.
You can’t perform that action at this time.