Fixed HttpClientTest test

This commit is contained in:
Dmitry Khomutov 2017-03-16 21:12:56 +07:00
parent 7165e8de3c
commit 075be27691
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -9,25 +9,25 @@ class HttpClientTest extends \PHPUnit_Framework_TestCase
public function testSimpleRequest() public function testSimpleRequest()
{ {
$http = new HttpClient(); $http = new HttpClient();
$html = $http->request('GET', 'https://www.cloudflare.com/'); $html = $http->request('GET', 'https://www.google.com');
$this->assertContains('Cloudflare', $html['body']); $this->assertContains('Google', $html['body']);
} }
public function testBaseUrl() public function testBaseUrl()
{ {
$http = new HttpClient('https://www.cloudflare.com'); $http = new HttpClient('https://www.google.com');
$html = $http->request('GET', '/'); $html = $http->request('GET', '/');
$this->assertContains('Cloudflare', $html['body']); $this->assertContains('Google', $html['body']);
} }
public function testGet() public function testGet()
{ {
$http = new HttpClient('https://www.cloudflare.com'); $http = new HttpClient('https://www.google.com');
$html = $http->get('overview', ['x' => 1]); $html = $http->get('overview', ['x' => 1]);
$this->assertContains('Cloudflare', $html['body']); $this->assertContains('Google', $html['body']);
} }
public function testGetJson() public function testGetJson()