aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-10-28 19:36:49 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-10-28 19:36:49 +0200
commit85898d3d2c7b5ce61a0f92299e06ceade000c4a8 (patch)
treed4b0c5ef93a7e10c7aea97ca3cd8b8fbfdf98a36 /tests/functional
parente3a85ff0a741549815224f962f87748818ed1b9e (diff)
parent466bdee8e6652ae5594b503b264ea075204e48b6 (diff)
downloadforums-85898d3d2c7b5ce61a0f92299e06ceade000c4a8.tar
forums-85898d3d2c7b5ce61a0f92299e06ceade000c4a8.tar.gz
forums-85898d3d2c7b5ce61a0f92299e06ceade000c4a8.tar.bz2
forums-85898d3d2c7b5ce61a0f92299e06ceade000c4a8.tar.xz
forums-85898d3d2c7b5ce61a0f92299e06ceade000c4a8.zip
Merge pull request #4489 from rxu/ticket/14830
[ticket/14830] Fix FORM_INVALID error during some ACP setting operations
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/search/base.php24
1 files changed, 10 insertions, 14 deletions
diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php
index d41e3ec925..f1e9b517d4 100644
--- a/tests/functional/search/base.php
+++ b/tests/functional/search/base.php
@@ -76,18 +76,16 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
{
$this->add_lang('acp/search');
$crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
- $form_values = $crawler->selectButton('Delete index')->form()->getValues();
- $crawler = self::request(
- 'POST',
- 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid,
+ $form = $crawler->selectButton('Create index')->form();
+ $form_values = $form->getValues();
+ $form_values = array_merge($form_values,
array(
'search_type' => $this->search_backend,
'action' => 'create',
- 'submit' => true,
- 'form_token' => $form_values['form_token'],
- 'creation_time' => $form_values['creation_time'],
)
);
+ $form->setValues($form_values);
+ $crawler = self::submit($form);
$this->assertContainsLang('SEARCH_INDEX_CREATED', $crawler->text());
}
@@ -95,18 +93,16 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
{
$this->add_lang('acp/search');
$crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
- $form_values = $crawler->selectButton('Delete index')->form()->getValues();
- $crawler = self::request(
- 'POST',
- 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid,
+ $form = $crawler->selectButton('Delete index')->form();
+ $form_values = $form->getValues();
+ $form_values = array_merge($form_values,
array(
'search_type' => $this->search_backend,
'action' => 'delete',
- 'submit' => true,
- 'form_token' => $form_values['form_token'],
- 'creation_time' => $form_values['creation_time'],
)
);
+ $form->setValues($form_values);
+ $crawler = self::submit($form);
$this->assertContainsLang('SEARCH_INDEX_REMOVED', $crawler->text());
}
}