Skip to content

Commit b8de9bc

Browse files
committed
added tests for Bing
1 parent 955808d commit b8de9bc

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

tests/BingTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use PHPUnit\Framework\TestCase;
4+
use SerpScraper\Engine\BingSearch;
5+
6+
final class BingTest extends TestCase
7+
{
8+
public function testSearch()
9+
{
10+
$bing = new BingSearch();
11+
$bing->setPreference('results_per_page', 50);
12+
13+
$res = $bing->search('bing');
14+
15+
$this->assertEquals(10, count($res->results));
16+
}
17+
}
18+

tests/GoogleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
final class GoogleTest extends TestCase
77
{
8-
public function testGoogleSearch()
8+
public function testSearch()
99
{
1010
$google = new GoogleSearch();
1111
$res = $google->search('google');

0 commit comments

Comments
 (0)