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

ID: 17963
Updated by: helgith@gmail.com
Reported By: Fedora at FamilleCollet dot com
Summary: Allow test suite to run without DNS resolver
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Validate
Operating System: GNU/Linux (Fedora 14)
Package Version: 0.8.4
PHP Version: 5.3.3
-Assigned To:
+Assigned To: dufuz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: dufuz
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.




Previous Comments:
------------------------------------------------------------------------

[2010-10-16 09:14:32] remicollet

Added #patch bug:17963;patch:dnstests.patch;revision:1287220472;.

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

[2010-10-16 09:14:16] remicollet

Description:
------------
When running test suite without a DNS resolver, some tests (with domain
check validation) fails.

This is the case in "koji" (the fedora RPM build system)

Seems a good idea to split test case with a "SKIP" condition for those
which requires a DNS resolver.

Test script:
---------------
mv /etc/resolv.conf /tmp
pear run-tests tests


Expected result:
----------------
# With the proposed patch and without DNS
Running 7 tests
SKIP domaincheck.phpt: Unit tests for[tests/domaincheck.phpt]
PASS email.phpt: Unit tests for[tests/email.phpt]
PASS multicard.phpt: Unit tests for 'Validate.php' : mutltiple() with
credit card
This test needs Validate_Finance_CreditCard installed to be
enabled[tests/multicard.phpt]
PASS multiple.phpt: Unit tests for 'Validate.php' without extension
(credit card)[tests/multiple.phpt]
PASS number.phpt: Unit tests for 'Validate.php'[tests/number.phpt]
PASS testdate.phpt: Unit tests for 'Validate.php'[tests/testdate.phpt]
PASS uri.phpt: Unit tests for Validate::uri()[tests/uri.phpt]
TOTAL TIME: 00:02
6 PASSED TESTS
1 SKIPPED TESTS

# And of course (with DNS)
Running 7 tests
PASS domaincheck.phpt: Unit tests for[tests/domaincheck.phpt]
PASS email.phpt: Unit tests for[tests/email.phpt]
PASS multicard.phpt: Unit tests for 'Validate.php' : mutltiple() with
credit card
This test needs Validate_Finance_CreditCard installed to be
enabled[tests/multicard.phpt]
PASS multiple.phpt: Unit tests for 'Validate.php' without extension
(credit card)[tests/multiple.phpt]
PASS number.phpt: Unit tests for 'Validate.php'[tests/number.phpt]
PASS testdate.phpt: Unit tests for 'Validate.php'[tests/testdate.phpt]
PASS uri.phpt: Unit tests for Validate::uri()[tests/uri.phpt]
TOTAL TIME: 00:02
7 PASSED TESTS
0 SKIPPED TESTS


Actual result:
--------------
# Without the proposed patch
Running 6 tests
FAIL email.phpt: Unit tests for[tests.orig/email.phpt]
PASS multicard.phpt: Unit tests for 'Validate.php' : mutltiple() with
credit card
This test needs Validate_Finance_CreditCard installed to be
enabled[tests.orig/multicard.phpt]
PASS multiple.phpt: Unit tests for 'Validate.php' without extension
(credit card)[tests.orig/multiple.phpt]
PASS number.phpt: Unit tests for 'Validate.php'[tests.orig/number.phpt]
PASS testdate.phpt: Unit tests for
'Validate.php'[tests.orig/testdate.phpt]
FAIL uri.phpt: Unit tests for Validate::uri()[tests.orig/uri.phpt]
wrote log to
"/home/extras/BUILD/php-pear-Validate-0.8.4/Validate-0.8.4/run-tests.log"
TOTAL TIME: 00:02
4 PASSED TESTS
0 SKIPPED TESTS
2 FAILED TESTS:
/home/extras/BUILD/php-pear-Validate-0.8.4/Validate-0.8.4/tests.orig/email.phpt
/home/extras/BUILD/php-pear-Validate-0.8.4/Validate-0.8.4/tests.orig/uri.phpt

cat tests.orig/email.diff
002- pear-general@lists.php.net: with domain check : YES
002+ pear-general@lists.php.net: with domain check : NO

$ cat tests.orig/uri.diff
019- //php.net: schemes() with domain check : YES
019+ //php.net: schemes() with domain check : NO
023- http://php.net: schemes(ftp,http) with domain check : YES
023+ http://php.net: schemes(ftp,http) with domain check : NO

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 15, '11 at 12:29a
activeMar 15, '11 at 12:29a
posts1
users1
websitepear.php.net

1 user in discussion

Helgith: 1 post

People

Translate

site design / logo © 2022 Grokbase