mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[ticket/13241] Remove sleep() and change flood interval instead
PHPBB3-13241
This commit is contained in:
parent
b868886b25
commit
1787ccb585
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user