From 0cc4deb495692b64ee18c27e7ec69d9f899d3fa9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 7 Jan 2016 11:52:19 +0100 Subject: [PATCH] [ticket/669] Purge cache if necessary in functional tests B3P-669 --- tests/functional/portal_announcement_test.php | 6 ++++++ tests/functional/portal_birthday_list_test.php | 2 ++ tests/functional/portal_no_error_test.php | 2 ++ 3 files changed, 10 insertions(+) diff --git a/tests/functional/portal_announcement_test.php b/tests/functional/portal_announcement_test.php index bde49813..b11eba6a 100644 --- a/tests/functional/portal_announcement_test.php +++ b/tests/functional/portal_announcement_test.php @@ -15,6 +15,7 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes public function setUp() { parent::setUp(); + $this->purge_cache(); $this->login(); $this->admin_login(); @@ -59,6 +60,11 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes public function test_shortened_message() { + if (!class_exists('\Nickvergessen\TrimMessage\TrimMessage')) + { + $this->markTestSkipped('Unable to test shortening message without TrimMessage tool'); + } + // Create topic as announcement $data = $this->create_topic(2, 'Portal-announce-global', str_repeat('This is a global announcement for the portal', 6), array( 'topic_type' => POST_GLOBAL, diff --git a/tests/functional/portal_birthday_list_test.php b/tests/functional/portal_birthday_list_test.php index cb438c89..a117d303 100644 --- a/tests/functional/portal_birthday_list_test.php +++ b/tests/functional/portal_birthday_list_test.php @@ -16,6 +16,8 @@ class phpbb_functional_portal_birthday_list_test extends \board3\portal\tests\te { parent::setUp(); + $this->purge_cache(); + $this->login(); $this->admin_login(); } diff --git a/tests/functional/portal_no_error_test.php b/tests/functional/portal_no_error_test.php index d226a395..617eaf30 100644 --- a/tests/functional/portal_no_error_test.php +++ b/tests/functional/portal_no_error_test.php @@ -16,6 +16,8 @@ class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testfra { parent::setUp(); + $this->purge_cache(); + $this->login(); $this->admin_login(); }