aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-07-06 14:38:42 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-10-05 21:15:34 +0530
commit07c259f4b1036ab299c3293c3961125c19907017 (patch)
tree7e8d42aa3cf672b28b297b6a03148441d8ad8077 /tests
parentb7d55b8ff882f702d02c152cdd6e2206c0b74c12 (diff)
downloadforums-07c259f4b1036ab299c3293c3961125c19907017.tar
forums-07c259f4b1036ab299c3293c3961125c19907017.tar.gz
forums-07c259f4b1036ab299c3293c3961125c19907017.tar.bz2
forums-07c259f4b1036ab299c3293c3961125c19907017.tar.xz
forums-07c259f4b1036ab299c3293c3961125c19907017.zip
[ticket/11608] rename search_found and not_found method
Rename search_found and search_not_found to assert_search_found and assert_search_not_found. Count .errorbox incase the search backend is not supported and skip tests PHPBB3-11608
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/search_test.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php
index 4ed49424b6..2090e73a4c 100644
--- a/tests/functional/search_test.php
+++ b/tests/functional/search_test.php
@@ -12,15 +12,14 @@
*/
abstract class phpbb_functional_search_test extends phpbb_functional_test_case
{
-
- protected function search_found($keywords)
+ protected function assert_search_found($keywords)
{
$crawler = self::request('GET', 'search.php?keywords=' . $keywords);
$this->assertEquals(1, $crawler->filter('.postbody')->count());
$this->assertEquals(3, $crawler->filter('.posthilit')->count());
}
- protected function search_not_found($keywords)
+ protected function assert_search_not_found($keywords)
{
$crawler = self::request('GET', 'search.php?keywords=' . $keywords);
$this->assertEquals(0, $crawler->filter('.postbody')->count());
@@ -47,19 +46,18 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case
$values = $form->getValues();
$crawler = self::submit($form);
- try
+ // check if search backend is not supported
+ if ($crawler->filter('.errorbox')->count() > 0);
{
- $crawler->filter('.errorbox')->text();
$this->markTestSkipped("Search backend is not supported/running");
}
- catch (InvalidArgumentException $e) {}
$this->create_search_index();
}
$this->logout();
- $this->search_found('phpbb3+installation');
- $this->search_not_found('loremipsumdedo');
+ $this->assert_search_found('phpbb3+installation');
+ $this->assert_search_not_found('loremipsumdedo');
$this->login();
$this->admin_login();