~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/curl/tests/curl_basic_010.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Test curl_error() & curl_errno() function with problematic proxy
 
3
--CREDITS--
 
4
TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
 
5
--SKIPIF--
 
6
<?php if (!extension_loaded("curl")) print "skip"; ?>
 
7
--FILE--
 
8
<?php
 
9
 
 
10
$url = "http://www.example.org";
 
11
$ch = curl_init();
 
12
curl_setopt($ch, CURLOPT_PROXY, uniqid().":".uniqid());
 
13
curl_setopt($ch, CURLOPT_URL, $url);
 
14
 
 
15
curl_exec($ch);
 
16
var_dump(curl_error($ch));
 
17
var_dump(curl_errno($ch));
 
18
curl_close($ch);
 
19
 
 
20
 
 
21
?>
 
22
--EXPECTF--
 
23
%unicode|string%(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:)%r %s"
 
24
int(5)