Edit report at http://bugs.php.net/bug.php?id=52448&edit=1

 ID:                 52448
 User updated by:    glen at delfi dot ee
 Reported by:        glen at delfi dot ee
 Summary:            ext/curl/tests/curl_error_basic.phpt fail
 Status:             Open
 Type:               Bug
 Package:            cURL related
 Operating System:   PLD Linux
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

this concrete test test for library error code when trying to connect to


unresolvable host. plz look the test code.



and library error string pattern has changed, so either it must be
updated (like 

i suggested a patch), or make it support various error formats.



i.e the link you gave suggested how to setup webserver for tests, but
this test 

does not connect to test webserver!


Previous Comments:
------------------------------------------------------------------------
[2010-07-27 04:34:58] srina...@php.net

pl. look at the test script carefully. there is instruction on how to
run this test script and also available at
http://wiki.php.net/qa/temp/ext/curl



if this convinces u ,pl. move this bug to bogus.

------------------------------------------------------------------------
[2010-07-26 20:03:16] glen at delfi dot ee

Description:
------------
the curl library error string has changed, trivial patch fixes that



tested with curl version = 7.21.0





========DIFF========

002+ Error: Could not resolve host: fakeURL (Domain name not found)

002- Error: Couldn't resolve host 'fakeURL'



Test script:
---------------
$ TEST_PHP_EXECUTABLE=$(which php) php run-tests.php --show-all
ext/curl/tests/curl_error_basic.phpt



=====================================================================

PHP         : /usr/bin/php

PHP_SAPI    : cli

PHP_VERSION : 5.3.3

ZEND_VERSION: 2.3.0

PHP_OS      : Linux - Linux carme-pld-i686 2.6.34.1-3 #1 SMP Tue Jul 6
16:15:11 CEST 2010 i686

INI actual  : /etc/php/php-cli.ini

More .INIs  :
/etc/php/conf.d/PCRE.ini,/etc/php/conf.d/SPL.ini,/etc/php/conf.d/bcmath.ini,/etc/php/conf.d/bz2.ini,/etc/php/conf.d/calendar.ini,/etc/php/conf.d/ctype.ini,/etc/php/conf.d/curl.ini,/etc/php/conf.d/dba.ini,/etc/php/conf.d/dom.ini,/etc/php/conf.d/ftp.ini,/etc/php/conf.d/gd.ini,/etc/php/conf.d/gettext.ini,/etc/php/conf.d/iconv.ini,/etc/php/conf.d/imap.ini,/etc/php/conf.d/ldap.ini,/etc/php/conf.d/mbstring.ini,/etc/php/conf.d/mcrypt.ini,/etc/php/conf.d/mysql.ini,/etc/php/conf.d/openssl.ini,/etc/php/conf.d/pgsql.ini,/etc/php/conf.d/posix.ini,/etc/php/conf.d/simplexml.ini,/etc/php/conf.d/soap.ini,/etc/php/conf.d/sockets.ini,/etc/php/conf.d/tidy.ini,/etc/php/conf.d/xml.ini,/etc/php/conf.d/xmlrpc.ini,/etc/php/conf.d/zlib.ini

CWD         : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3

Extra dirs  :

VALGRIND    : Not used

=====================================================================

Running selected tests.

TEST 1/1 [ext/curl/tests/curl_error_basic.phpt]

========SKIP========

<?php if (!extension_loaded("curl")) print "skip"; ?>

========DONE========



========TEST========

<?php

/*

 * Prototype:     string curl_error(resource $ch)

 * Description:   Returns a clear text error message for the last cURL
operation.

 * Source:        ext/curl/interface.c

 * Documentation: http://wiki.php.net/qa/temp/ext/curl

 */



// Fake URL to trigger an error

$url = "fakeURL";



echo "== Testing curl_error with a fake URL ==\n";



// cURL handler

$ch = curl_init($url);



ob_start(); // start output buffering

curl_exec($ch);

echo "Error: " . curl_error($ch);

curl_close($ch);



?>

========DONE========



========OUT========

== Testing curl_error with a fake URL ==

Error: Could not resolve host: fakeURL (Domain name not found)

========DONE========



========EXP========

== Testing curl_error with a fake URL ==

Error: Couldn't resolve host 'fakeURL'

========DONE========



========DIFF========

002+ Error: Could not resolve host: fakeURL (Domain name not found)

002- Error: Couldn't resolve host 'fakeURL'

========DONE========

FAIL curl_error() function - basic test for curl_error using a fake url
[ext/curl/tests/curl_error_basic.phpt]

=====================================================================

Number of tests :    1                 1

Tests skipped   :    0 (  0.0%) --------

Tests warned    :    0 (  0.0%) (  0.0%)

Tests failed    :    1 (100.0%) (100.0%)

Expected fail   :    0 (  0.0%) (  0.0%)

Tests passed    :    0 (  0.0%) (  0.0%)

---------------------------------------------------------------------

Time taken      :    0 seconds

=====================================================================



=====================================================================

FAILED TEST SUMMARY

---------------------------------------------------------------------

curl_error() function - basic test for curl_error using a fake url
[ext/curl/tests/curl_error_basic.phpt]

=====================================================================





------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52448&edit=1

Reply via email to