mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing failing test, picked in from 1.2.
This commit is contained in:
parent
bfde6b81fe
commit
d93c94f702
2 changed files with 4 additions and 3 deletions
|
@ -172,7 +172,8 @@ class FormHelper extends AppHelper {
|
||||||
if (is_array($model) && empty($options)) {
|
if (is_array($model) && empty($options)) {
|
||||||
$options = $model;
|
$options = $model;
|
||||||
$model = null;
|
$model = null;
|
||||||
} elseif (empty($model) && $model !== false && !empty($this->params['models'])) {
|
}
|
||||||
|
if (empty($model) && $model !== false && !empty($this->params['models'])) {
|
||||||
$model = $this->params['models'][0];
|
$model = $this->params['models'][0];
|
||||||
$this->defaultModel = $this->params['models'][0];
|
$this->defaultModel = $this->params['models'][0];
|
||||||
} elseif (empty($model) && empty($this->params['models'])) {
|
} elseif (empty($model) && empty($this->params['models'])) {
|
||||||
|
|
|
@ -5056,14 +5056,14 @@ class FormHelperTest extends CakeTestCase {
|
||||||
$result = $this->Form->create(array('url' => array('action' => 'index', 'param')));
|
$result = $this->Form->create(array('url' => array('action' => 'index', 'param')));
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'form' => array(
|
'form' => array(
|
||||||
'id' => 'ContactAddForm', 'method' => 'post', 'action' => '/contacts/index/param'
|
'id' => 'ContactAddForm', 'method' => 'post', 'action' => '/contacts/index/param',
|
||||||
|
'accept-charset' => 'utf-8'
|
||||||
),
|
),
|
||||||
'fieldset' => array('style' => 'preg:/display\s*\:\s*none;\s*/'),
|
'fieldset' => array('style' => 'preg:/display\s*\:\s*none;\s*/'),
|
||||||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
||||||
'/fieldset'
|
'/fieldset'
|
||||||
);
|
);
|
||||||
$this->assertTags($result, $expected);
|
$this->assertTags($result, $expected);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue