aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/search/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/search/base.php')
-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());
}
}