diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-13 23:09:45 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-13 23:09:45 -0600 |
commit | d739745ea4ccc224b6b7fb686339138733c2203d (patch) | |
tree | 68e382b7202ba18af9bbf6f775f3d03f318af667 /tests/functional/posting_test.php | |
parent | 9eb9fa2b9d117b919dfcc1e37d6c1186841b4fe7 (diff) | |
download | forums-d739745ea4ccc224b6b7fb686339138733c2203d.tar forums-d739745ea4ccc224b6b7fb686339138733c2203d.tar.gz forums-d739745ea4ccc224b6b7fb686339138733c2203d.tar.bz2 forums-d739745ea4ccc224b6b7fb686339138733c2203d.tar.xz forums-d739745ea4ccc224b6b7fb686339138733c2203d.zip |
[ticket/8610] Move posting helpers to separate file
This is to prevent cluttering up the functional test case class more
PHPBB3-8610
Diffstat (limited to 'tests/functional/posting_test.php')
-rw-r--r-- | tests/functional/posting_test.php | 8 |
1 files changed, 6 insertions, 2 deletions
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()); |