diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-07-03 23:25:19 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-10-05 21:15:33 +0530 |
commit | b7d55b8ff882f702d02c152cdd6e2206c0b74c12 (patch) | |
tree | 069d2906ef661ebaf38895aa827b369b43ccfffa /tests/functional | |
parent | e1030d3670feb5580ce51b6fc2ef3b8e9f8d2380 (diff) | |
download | forums-b7d55b8ff882f702d02c152cdd6e2206c0b74c12.tar forums-b7d55b8ff882f702d02c152cdd6e2206c0b74c12.tar.gz forums-b7d55b8ff882f702d02c152cdd6e2206c0b74c12.tar.bz2 forums-b7d55b8ff882f702d02c152cdd6e2206c0b74c12.tar.xz forums-b7d55b8ff882f702d02c152cdd6e2206c0b74c12.zip |
[ticket/11608] pass keywords to search_found and search_not_found test
PHPBB3-11608
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/search_test.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index ec5f9de64b..4ed49424b6 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -13,17 +13,19 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case { - protected function search_found() + protected function search_found($keywords) { - $crawler = self::request('GET', 'search.php?keywords=phpbb3+installation'); + $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() + protected function search_not_found($keywords) { - $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); + $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(0, $crawler->filter('.postbody')->count()); + $split_keywords_string = str_replace(array('+', '-'), ' ', $keywords); + $this->assertEquals($split_keywords_string, $crawler->filter('#keywords')->attr('value')); } public function test_search_backend() @@ -48,7 +50,7 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case try { $crawler->filter('.errorbox')->text(); - self::markTestSkipped("Search backend is not supported/running"); + $this->markTestSkipped("Search backend is not supported/running"); } catch (InvalidArgumentException $e) {} @@ -56,8 +58,8 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case } $this->logout(); - $this->search_found(); - $this->search_not_found(); + $this->search_found('phpbb3+installation'); + $this->search_not_found('loremipsumdedo'); $this->login(); $this->admin_login(); |