Skip to content

Commit

Permalink
Add missing test that is present in 3.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Jan 4, 2016
1 parent a2ce6c8 commit 7076e6d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/Cake/Test/Case/View/Helper/FormHelperTest.php
Expand Up @@ -8598,7 +8598,28 @@ public function testCreate() {
$this->assertTags($result, $expected);
}


/**
* Test create() with no URL (no "action" attribute for <form> tag)
*
* @return void
*/
public function testCreateNoUrl() {
$result = $this->Form->create(false, array('url' => false));
$expected = array(
'form' => array(
'id' => 'addForm',
'method' => 'post',
'accept-charset' => strtolower(Configure::read('App.encoding'))
),
'div' => array('style' => 'display:none;'),
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
'/div'
);
$this->assertHtml($expected, $result);
}

/**
* Test the onsubmit option for create()
*
* @return void
Expand Down

0 comments on commit 7076e6d

Please sign in to comment.