11ea7a6baSAndreas Gohr<?php 21ea7a6baSAndreas Gohr 395e6ded1SAndreas Gohrrequire_once (__DIR__ . '/httpclient_mock.php'); 495e6ded1SAndreas Gohr 51ea7a6baSAndreas Gohrclass httpclient_http_proxy_test extends DokuWikiTest { 6b7cfeab6SAndreas Gohr protected $url = 'http://test.dokuwiki.org/README'; 71ea7a6baSAndreas Gohr 81ea7a6baSAndreas Gohr /** 91ea7a6baSAndreas Gohr * @group internet 101ea7a6baSAndreas Gohr */ 111ea7a6baSAndreas Gohr function test_simpleget(){ 1295e6ded1SAndreas Gohr $http = new HTTPMockClient(); 13a20ce704SAndreas Gohr // proxy provided by Andrwe Lord Weber <dokuwiki@andrwe.org> 14a20ce704SAndreas Gohr $http->proxy_host = 'proxy.andrwe.org'; 15a20ce704SAndreas Gohr $http->proxy_port = 8080; 161ea7a6baSAndreas Gohr 171ea7a6baSAndreas Gohr $data = $http->get($this->url); 18*09513545SAndreas Gohr $this->assertFalse($data === false, 'HTTP response: '.$http->error.' ['.$this->url.']'); 191ea7a6baSAndreas Gohr $this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content'); 201ea7a6baSAndreas Gohr } 211ea7a6baSAndreas Gohr}