xref: /dokuwiki/_test/tests/inc/httpclient_http_proxy.test.php (revision a20ce704cbd26eccbca8bf01dadac23a1432e1a5)
11ea7a6baSAndreas Gohr<?php
21ea7a6baSAndreas Gohr
31ea7a6baSAndreas Gohrclass httpclient_http_proxy_test extends DokuWikiTest {
41ea7a6baSAndreas Gohr    protected $url = 'http://www.dokuwiki.org/README';
51ea7a6baSAndreas Gohr
61ea7a6baSAndreas Gohr    /**
71ea7a6baSAndreas Gohr     * @group internet
81ea7a6baSAndreas Gohr     */
91ea7a6baSAndreas Gohr    function test_simpleget(){
101ea7a6baSAndreas Gohr        $http = new HTTPClient();
11*a20ce704SAndreas Gohr        // proxy provided by  Andrwe Lord Weber <dokuwiki@andrwe.org>
12*a20ce704SAndreas Gohr        $http->proxy_host = 'proxy.andrwe.org';
13*a20ce704SAndreas Gohr        $http->proxy_port = 8080;
141ea7a6baSAndreas Gohr
151ea7a6baSAndreas Gohr        $data = $http->get($this->url);
161ea7a6baSAndreas Gohr        $this->assertFalse($data === false, 'HTTP response');
171ea7a6baSAndreas Gohr        $this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content');
181ea7a6baSAndreas Gohr    }
191ea7a6baSAndreas Gohr
201ea7a6baSAndreas Gohr}