aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-09-01 10:35:46 -0400
committerDavid King <imkingdavid@gmail.com>2012-09-01 10:37:44 -0400
commit7dfe26dd781e7bd0438041058e2a1d95176e7836 (patch)
tree2756243b6ff1554eb79118767d6d7c8a21b1bc4e /tests/functional
parent7cffebbd4997f8a41a871f8ea6fe12dc0abc08c8 (diff)
downloadforums-7dfe26dd781e7bd0438041058e2a1d95176e7836.tar
forums-7dfe26dd781e7bd0438041058e2a1d95176e7836.tar.gz
forums-7dfe26dd781e7bd0438041058e2a1d95176e7836.tar.bz2
forums-7dfe26dd781e7bd0438041058e2a1d95176e7836.tar.xz
forums-7dfe26dd781e7bd0438041058e2a1d95176e7836.zip
[task/functional] Allow tests to bypass certain restrictions with DEBUG_TEST
PHPBB3-10758
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/posting_test.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 8d722361e0..f54a3591b2 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -47,13 +47,6 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
// is not at least 2 seconds before submission, cancel the form
$form_data['lastclick'] = 0;
- // The add_form_key()/check_form_key() safeguards present a challenge because they require
- // the timestamp created in add_form_key() to be sent as-is to check_form_key() but in check_form_key()
- // it won't allow the current time to be the same as the timestamp it requires.
- // As such, automated scripts like this one have to somehow bypass this without being able to change
- // the timestamp. The only way I can think to do so is using sleep()
- sleep(1);
-
// I use a request because the form submission method does not allow you to send data that is not
// contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs)
// Instead, I send it as a request with the submit button "post" set to true.
@@ -96,9 +89,8 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
}
}
- // For reasoning behind the following two commands, see the test_post_new_topic() test
+ // For reasoning behind the following command, see the test_post_new_topic() test
$form_data['lastclick'] = 0;
- sleep(1);
// Submit the post
$crawler = $this->client->request('POST', 'posting.php', $form_data);