public function testWithCredentials() { $curl = new Curl(); $curl->setMethod('GET'); $curl->setOption(CURLOPT_URL, 'http://httpbin.org/basic-auth/foo/bar'); $credentials = new BasicCredentials('foo', 'bar'); $curl->setCredentials($credentials); $response = $curl->execute(); }
public function testImap() { $this->markTestSkipped('No credentials'); $curl = new Curl(); $curl->setTimeout(4); $curl->setOption(CURLOPT_PROTOCOLS, CURLPROTO_IMAP | CURLPROTO_IMAPS); $curl->setUrl('imaps://imap.gmail.com/INBOX'); $curl->setMethod('EXAMINE'); $curl->setCredentials(new BasicCredentials('', '')); $response = $curl->execute(); }