mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding custom URL test for FormHelper::create()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5730 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5f0ea6fd2e
commit
c15b36905a
1 changed files with 7 additions and 2 deletions
|
@ -811,11 +811,16 @@ class FormHelperTest extends CakeTestCase {
|
|||
|
||||
$result = $this->Form->create('User', array('url' => array('action' => 'login')));
|
||||
$this->assertPattern('/id="UserAddForm"/', $result);
|
||||
$this->assertPattern('/action="\/users\/login[\/]"/', $result);
|
||||
$this->assertPattern('/action="\/users\/login(\/)?"/', $result);
|
||||
|
||||
$result = $this->Form->create('User', array('action' => 'login'));
|
||||
$this->assertPattern('/id="UserLoginForm"/', $result);
|
||||
$this->assertPattern('/action="\/users\/login[\/]"/', $result);
|
||||
$this->assertPattern('/action="\/users\/login(\/)?"/', $result);
|
||||
|
||||
$result = $this->Form->create('User', array('url' => '/users/login'));
|
||||
$this->assertPattern('/method="post"/', $result);
|
||||
$this->assertPattern('/action="\/users\/login(\/)?"/', $result);
|
||||
$this->assertNoPattern('/^<form[^<>]+[^method|action]=[^<>]*>/', $result);
|
||||
}
|
||||
|
||||
function testFormMagicInput() {
|
||||
|
|
Loading…
Add table
Reference in a new issue