aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/feed_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/feed_test.php')
-rw-r--r--tests/functional/feed_test.php25
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index ddf17d4749..9041c8dc69 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -840,9 +840,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
'Feeds #1.1',
),
));
-
- // We have to wait because of the flood interval.
- sleep(15);
+ $this->set_flood_interval(0);
$this->login('disapprove_user');
$post = $this->create_topic($this->data['forums']['Feeds #1.1'], 'Feeds #1.1 - Topic #3', 'This is a test topic posted by the testing framework.', array(), 'POST_STORED_MOD');
@@ -850,6 +848,27 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
$crawler = self::request('GET', "viewforum.php?f={$this->data['forums']['Feeds #1.1']}&sid={$this->sid}");
$this->assertNotContains('Feeds #1.1 - Topic #3', $crawler->filter('html')->text());
+
+ $this->logout();
+ $this->set_flood_interval(15);
+ }
+
+ protected function set_flood_interval($flood_interval)
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_board&mode=post');
+
+ $form = $crawler->selectButton('Submit')->form();
+ $values = $form->getValues();
+
+ $values["config[flood_interval]"] = $flood_interval;
+ $form->setValues($values);
+ $crawler = self::submit($form);
+ $this->assertGreaterThan(0, $crawler->filter('.successbox')->count());
+
+ $this->logout();
}
public function test_feeds_unapproved_topic_admin()