blob: dae801dbd751900de10dcfe44896e49f1fa2b354 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
require_once (__DIR__ . '/httpclient_mock.php');
class httpclient_http_proxy_test extends DokuWikiTest {
protected $url = 'http://httpbin.org/user-agent';
/**
* @group internet
*/
function test_simpleget(){
$http = new HTTPMockClient();
// proxy provided by Andrwe Lord Weber <dokuwiki@andrwe.org>
$http->proxy_host = 'proxy.andrwe.org';
$http->proxy_port = 8080;
$data = $http->get($this->url);
$this->assertFalse($data === false, 'HTTP response: '.$http->error.' ['.$this->url.']');
$this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content');
}
}
|