aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-09-18 11:47:18 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-09-18 15:30:25 +0200
commit72f6241aa2c6d129c8c49380d84fd915d589aa6c (patch)
tree47a1c4bd25564b2d3b037e3f2cc2adc11129b35b /tests
parent585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d (diff)
downloadforums-72f6241aa2c6d129c8c49380d84fd915d589aa6c.tar
forums-72f6241aa2c6d129c8c49380d84fd915d589aa6c.tar.gz
forums-72f6241aa2c6d129c8c49380d84fd915d589aa6c.tar.bz2
forums-72f6241aa2c6d129c8c49380d84fd915d589aa6c.tar.xz
forums-72f6241aa2c6d129c8c49380d84fd915d589aa6c.zip
[ticket/14789] Add form tokens to tests and uncomment add_form_key
PHPBB3-14789
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/search/base.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php
index 1d37d748df..d41e3ec925 100644
--- a/tests/functional/search/base.php
+++ b/tests/functional/search/base.php
@@ -75,6 +75,8 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
protected function create_search_index()
{
$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,
@@ -82,6 +84,8 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
'search_type' => $this->search_backend,
'action' => 'create',
'submit' => true,
+ 'form_token' => $form_values['form_token'],
+ 'creation_time' => $form_values['creation_time'],
)
);
$this->assertContainsLang('SEARCH_INDEX_CREATED', $crawler->text());
@@ -90,6 +94,8 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
protected function delete_search_index()
{
$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,
@@ -97,6 +103,8 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
'search_type' => $this->search_backend,
'action' => 'delete',
'submit' => true,
+ 'form_token' => $form_values['form_token'],
+ 'creation_time' => $form_values['creation_time'],
)
);
$this->assertContainsLang('SEARCH_INDEX_REMOVED', $crawler->text());