1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-29 18:50:25 +02:00

[ticket/11608] Use assertEquals for more accurate assertions

PHPBB3-11608
This commit is contained in:
Dhruv 2013-06-19 02:23:14 +05:30
parent 5825bf7d33
commit 75d16da9fa

View File

@ -16,14 +16,14 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case
protected function search_found() protected function search_found()
{ {
$crawler = self::request('GET', 'search.php?keywords=phpbb3+installation'); $crawler = self::request('GET', 'search.php?keywords=phpbb3+installation');
$this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); $this->assertEquals(1, $crawler->filter('.postbody')->count());
$this->assertEquals(3, $crawler->filter('.posthilit')->count()); $this->assertEquals(3, $crawler->filter('.posthilit')->count());
} }
protected function search_not_found() protected function search_not_found()
{ {
$crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo');
$this->assertLessThan(1, $crawler->filter('.postbody')->count()); $this->assertEquals(0, $crawler->filter('.postbody')->count());
} }
public function test_search_backend() public function test_search_backend()