|
|
@@ -8323,82 +8323,7 @@ class FormHelperTest extends TestCase {
|
|
|
* @return void
|
|
|
*/
|
|
|
public function testFormEnd() {
|
|
|
- $this->markTestIncomplete('Need to revisit once models work again.');
|
|
|
$this->assertEquals('</form>', $this->Form->end());
|
|
|
-
|
|
|
- $result = $this->Form->end('');
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'submit'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => ''),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end(array('label' => ''));
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'submit'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => ''),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end('save');
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'submit'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => 'save'),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end(array('label' => 'save'));
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'submit'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => 'save'),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end(array('label' => 'save', 'name' => 'Whatever'));
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'submit'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => 'save', 'name' => 'Whatever'),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end(array('name' => 'Whatever'));
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'submit'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => 'Submit', 'name' => 'Whatever'),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end(array('label' => 'save', 'name' => 'Whatever', 'div' => 'good'));
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'good'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => 'save', 'name' => 'Whatever'),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
-
|
|
|
- $result = $this->Form->end(array(
|
|
|
- 'label' => 'save', 'name' => 'Whatever', 'div' => array('class' => 'good')
|
|
|
- ));
|
|
|
- $expected = array(
|
|
|
- 'div' => array('class' => 'good'),
|
|
|
- 'input' => array('type' => 'submit', 'value' => 'save', 'name' => 'Whatever'),
|
|
|
- '/div',
|
|
|
- '/form'
|
|
|
- );
|
|
|
- $this->assertTags($result, $expected);
|
|
|
}
|
|
|
|
|
|
/**
|