aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-10-29 15:10:39 +0100
committerAndreas Fischer <bantu@phpbb.com>2014-10-29 15:10:39 +0100
commit17928563a2a265f4b70feef64e5030ea3c602269 (patch)
tree02efc9bc621794e490e851a71f07bdad7c1c8d1e /tests/test_framework
parentbb4f65d74386acbc7940bdebfb7f4082e295843c (diff)
parent1787ccb5852e09566ba13040ad3f8ca53052e6dd (diff)
downloadforums-17928563a2a265f4b70feef64e5030ea3c602269.tar
forums-17928563a2a265f4b70feef64e5030ea3c602269.tar.gz
forums-17928563a2a265f4b70feef64e5030ea3c602269.tar.bz2
forums-17928563a2a265f4b70feef64e5030ea3c602269.tar.xz
forums-17928563a2a265f4b70feef64e5030ea3c602269.zip
Merge pull request #3093 from nickvergessen/ticket/13241
[ticket/13241] Fix pagination of viewforum with global announcements * nickvergessen/ticket/13241: [ticket/13241] Remove sleep() and change flood interval instead [ticket/13241] Remove sleep() since the method takes care of this now [ticket/13241] Sleep for 1 second when posting twice in the same second [ticket/13241] Fix pagination with global announcements [ticket/13241] Correctly ignore announcements from topics list [ticket/13241] Add a functional test for viewforum with global announcement
Diffstat (limited to 'tests/test_framework')
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php7
-rw-r--r--tests/test_framework/phpbb_test_case.php2
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 840ff981cb..51bae7a723 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -38,6 +38,7 @@ class phpbb_functional_test_case extends phpbb_test_case
static protected $config = array();
static protected $already_installed = false;
+ static protected $last_post_timestamp = 0;
static public function setUpBeforeClass()
{
@@ -1098,6 +1099,12 @@ class phpbb_functional_test_case extends phpbb_test_case
*/
protected function submit_message($posting_url, $posting_contains, $form_data)
{
+ if (time() == self::$last_post_timestamp)
+ {
+ // Travis is too fast, so we have to wait to not mix up the post/topic order
+ sleep(1);
+ }
+ self::$last_post_timestamp = time();
$crawler = self::request('GET', $posting_url);
$this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text());
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php
index c39f7835d1..01d26fb67d 100644
--- a/tests/test_framework/phpbb_test_case.php
+++ b/tests/test_framework/phpbb_test_case.php
@@ -26,7 +26,7 @@ class phpbb_test_case extends PHPUnit_Framework_TestCase
'PHP_Token_Stream' => array('customTokens'),
'PHP_Token_Stream_CachingFactory' => array('cache'),
- 'phpbb_database_test_case' => array('already_connected'),
+ 'phpbb_database_test_case' => array('already_connected', 'last_post_timestamp'),
);
}