From d739745ea4ccc224b6b7fb686339138733c2203d Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 13 Dec 2012 23:09:45 -0600 Subject: [ticket/8610] Move posting helpers to separate file This is to prevent cluttering up the functional test case class more PHPBB3-8610 --- tests/functional/posting_test.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/functional') diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index 6aa7a46974..dd078286d6 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -15,15 +15,19 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case public function test_post_new_topic() { $this->login(); + + include(__DIR__ . './../test_framework/posting_helpers.php'); + + $posting_helper = new phpbb_test_framework_posting_helpers($this); // Test creating topic - $post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.'); + $post = $posting_helper->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.'); $crawler = $this->request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}"); $this->assertContains('This is a test topic posted by the testing framework.', $crawler->filter('html')->text()); // Test creating a reply - $post2 = $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post posted by the testing framework.'); + $post2 = $posting_helper->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post posted by the testing framework.'); $crawler = $this->request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}"); $this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text()); -- cgit v1.2.1