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