xref: /dokuwiki/_test/tests/inc/httpclient_http_proxy.test.php (revision 1ea7a6bada66fc9b7a45f61b4892e4ea23196d89)
1<?php
2
3class httpclient_http_proxy_test extends DokuWikiTest {
4    protected $url = 'http://www.dokuwiki.org/README';
5
6    /**
7     * @group internet
8     */
9    function test_simpleget(){
10        $http = new HTTPClient();
11        $http->proxy_host = 'localhost'; //FIXME we need a public server
12        $http->proxy_port = 3128;
13
14        $data = $http->get($this->url);
15        $this->assertFalse($data === false, 'HTTP response');
16        $this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content');
17    }
18
19}