aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-05-31 16:16:41 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-05-31 16:16:41 +0200
commitb7b81f64316a900d6de308d4b65f89b7b4b58e2f (patch)
treea94889d5da04ca41520d74290fd8311820a98371 /tests/functional
parentb4d23fa5519d4c0baa562990cf48ed058473fed4 (diff)
downloadforums-b7b81f64316a900d6de308d4b65f89b7b4b58e2f.tar
forums-b7b81f64316a900d6de308d4b65f89b7b4b58e2f.tar.gz
forums-b7b81f64316a900d6de308d4b65f89b7b4b58e2f.tar.bz2
forums-b7b81f64316a900d6de308d4b65f89b7b4b58e2f.tar.xz
forums-b7b81f64316a900d6de308d4b65f89b7b4b58e2f.zip
[ticket/11568] Use static calls for static methods
PHPBB3-11568
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/auth_test.php8
-rw-r--r--tests/functional/browse_test.php6
-rw-r--r--tests/functional/common_groups_test.php4
-rw-r--r--tests/functional/posting_test.php14
4 files changed, 16 insertions, 16 deletions
diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php
index a0c909e798..afb4f15fc2 100644
--- a/tests/functional/auth_test.php
+++ b/tests/functional/auth_test.php
@@ -17,7 +17,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
$this->login();
// check for logout link
- $crawler = $this->request('GET', 'index.php');
+ $crawler = self::request('GET', 'index.php');
$this->assertContains($this->lang('LOGOUT_USER', 'admin'), $crawler->filter('.navbar')->text());
}
@@ -25,7 +25,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
{
$this->create_user('anothertestuser');
$this->login('anothertestuser');
- $crawler = $this->request('GET', 'index.php');
+ $crawler = self::request('GET', 'index.php');
$this->assertContains('anothertestuser', $crawler->filter('.icon-logout')->text());
}
@@ -38,11 +38,11 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
$this->add_lang('ucp');
// logout
- $crawler = $this->request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
+ $crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
$this->assertContains($this->lang('LOGOUT_REDIRECT'), $crawler->filter('#message')->text());
// look for a register link, which should be visible only when logged out
- $crawler = $this->request('GET', 'index.php');
+ $crawler = self::request('GET', 'index.php');
$this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
}
}
diff --git a/tests/functional/browse_test.php b/tests/functional/browse_test.php
index 26c18c4c1f..18a2ad9464 100644
--- a/tests/functional/browse_test.php
+++ b/tests/functional/browse_test.php
@@ -14,19 +14,19 @@ class phpbb_functional_browse_test extends phpbb_functional_test_case
{
public function test_index()
{
- $crawler = $this->request('GET', 'index.php');
+ $crawler = self::request('GET', 'index.php');
$this->assertGreaterThan(0, $crawler->filter('.topiclist')->count());
}
public function test_viewforum()
{
- $crawler = $this->request('GET', 'viewforum.php?f=2');
+ $crawler = self::request('GET', 'viewforum.php?f=2');
$this->assertGreaterThan(0, $crawler->filter('.topiclist')->count());
}
public function test_viewtopic()
{
- $crawler = $this->request('GET', 'viewtopic.php?t=1');
+ $crawler = self::request('GET', 'viewtopic.php?t=1');
$this->assertGreaterThan(0, $crawler->filter('.postbody')->count());
}
}
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php
index 6e1f1afdce..7c88ec900d 100644
--- a/tests/functional/common_groups_test.php
+++ b/tests/functional/common_groups_test.php
@@ -35,10 +35,10 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
$this->add_lang(array('ucp', 'acp/groups'));
// Manage Administrators group
- $crawler = $this->request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
+ $crawler = self::request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
$form['group_colour']->setValue($input);
- $crawler = $this->submit($form);
+ $crawler = self::submit($form);
$this->assertContains($this->lang($expected), $crawler->text());
}
}
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 5cf7559245..9bcfcc2fda 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -19,17 +19,17 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
// Test creating topic
$post = $this->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}");
+ $crawler = self::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.');
- $crawler = $this->request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::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());
// Test quoting a message
- $crawler = $this->request('GET', "posting.php?mode=quote&f=2&t={$post2['topic_id']}&p={$post2['post_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "posting.php?mode=quote&f=2&t={$post2['topic_id']}&p={$post2['post_id']}&sid={$this->sid}");
$this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text());
}
@@ -54,7 +54,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
'post' => true,
), $additional_form_data);
- return $this->submit_post($posting_url, 'POST_TOPIC', $form_data);
+ return self::submit_post($posting_url, 'POST_TOPIC', $form_data);
}
/**
@@ -78,7 +78,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
'post' => true,
), $additional_form_data);
- return $this->submit_post($posting_url, 'POST_REPLY', $form_data);
+ return self::submit_post($posting_url, 'POST_REPLY', $form_data);
}
/**
@@ -93,7 +93,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
{
$this->add_lang('posting');
- $crawler = $this->request('GET', $posting_url);
+ $crawler = self::request('GET', $posting_url);
$this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text());
$hidden_fields = array(
@@ -117,7 +117,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
// I use a request because the form submission method does not allow you to send data that is not
// contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs)
// Instead, I send it as a request with the submit button "post" set to true.
- $crawler = $this->request('POST', $posting_url, $form_data);
+ $crawler = self::request('POST', $posting_url, $form_data);
$this->assertContains($this->lang('POST_STORED'), $crawler->filter('html')->text());
$url = $crawler->selectLink($this->lang('VIEW_MESSAGE', '', ''))->link()->getUri();