cvs: pear /Validate/tests validate_AU.phpt

From: Date: Sun, 19 Aug 2007 22:57:55 +0000
Subject: cvs: pear /Validate/tests validate_AU.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-48462@lists.php.net to get a copy of this message
kguest Sun Aug 19 22:57:55 2007 UTC Modified files: /pear/Validate/tests validate_AU.phpt Log: Bug #11869 AU's tests of functions using @DATADIR@ need to work when tests run from CVS. http://cvs.php.net/viewvc.cgi/pear/Validate/tests/validate_AU.phpt?r1=1.4&r2=1.5&diff_format=u Index: pear/Validate/tests/validate_AU.phpt diff -u pear/Validate/tests/validate_AU.phpt:1.4 pear/Validate/tests/validate_AU.phpt:1.5 --- pear/Validate/tests/validate_AU.phpt:1.4 Sat Jul 21 17:39:08 2007 +++ pear/Validate/tests/validate_AU.phpt Sun Aug 19 22:57:55 2007 @@ -5,7 +5,13 @@ // // Validate test script include (dirname(__FILE__) . '/validate_functions.inc'); -require_once 'Validate/AU.php'; +if (is_file(dirname(__FILE__) . '/../Validate/AU.php')) { + require_once dirname(__FILE__) . '/../Validate/AU.php'; + $dataDir = '../data'; +} else { + require_once 'Validate/AU.php'; + $dataDir = null; +} echo "Test Validate_AU\n"; echo "****************\n"; @@ -99,8 +105,8 @@ $errorFound = false; -$errorFound = $errorFound || test_func(array('validate_AU','postalCode'), $postalCodes ); -$errorFound = $errorFound || test_func(array('validate_AU','postalCode'), $postalCodesStrong,true); +$errorFound = $errorFound || test_func(array('validate_AU','postalCode'), $postalCodes, array(false, $dataDir)); +$errorFound = $errorFound || test_func(array('validate_AU','postalCode'), $postalCodesStrong,array(true, $dataDir)); $errorFound = $errorFound || test_func(array('validate_AU','abn'), $abns ); $errorFound = $errorFound || test_func(array('validate_AU','acn'), $acns ); $errorFound = $errorFound || test_func(array('validate_AU','tfn'), $tfns ); @@ -111,6 +117,7 @@ **************** --------- Test validate_AU::postalCode +extra params:|../data _ Value State Return V = validation result is right X = validation result is wrong @@ -124,7 +131,7 @@ V a7000 : KO KO --------- Test validate_AU::postalCode -extra params:1 +extra params:1|../data _ Value State Return V = validation result is right X = validation result is wrong @@ -207,4 +214,4 @@ _ Value State Return V = validation result is right X = validation result is wrong - V 123 456 782 : OK OK \ No newline at end of file + V 123 456 782 : OK OK

« previous php.pear.cvs (#48462) next »