cvs: pear /Validate/tests validate_IN_region.phpt
| From: | Ken Guest | Date: | Mon, 17 Sep 2007 22:20:32 +0000 |
| Subject: | cvs: pear /Validate/tests validate_IN_region.phpt | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48618@lists.php.net to get a copy of this message | ||
kguest Mon Sep 17 22:20:32 2007 UTC
Added files:
/pear/Validate/tests validate_IN_region.phpt
Log:
Bug #12066 no test present for region method
http://cvs.php.net/viewvc.cgi/pear/Validate/tests/validate_IN_region.phpt?view=markup&rev=1.1
Index: pear/Validate/tests/validate_IN_region.phpt
+++ pear/Validate/tests/validate_IN_region.phpt
--TEST--
validate_IN_region.phpt: Unit tests for region method 'Validate/IN.php'
--FILE--
<?php
$noYes = array('NO', 'YES');
if (is_file(dirname(__FILE__) . '/../Validate/IN.php')) {
require_once dirname(__FILE__) . '/../Validate/IN.php';
} else {
require_once 'Validate/IN.php';
}
echo "Test Validate_IN\n";
echo "****************\n";
echo "\nTest Region\n";
$regions= array(
"AN", "AP", "AR", "AS", "BR",
"CH", "CT", "DN", "DD",
"DL", "GA", "GJ", "HR", "HP",
"JK", "JH", "KA", "KL",
"LD", "MP", "MH", "MN", "ML",
"MZ", "NL", "OR", "PY",
"PB", "RJ", "SK", "TN", "TR",
"UL", "UP", "WB",
"IE", "AM", "BA", "NC", "IS");
foreach ($regions as $region) {
echo "{$region}: ".$noYes[Validate_IN::region($region)]."\n";
}
exit(0);
?>
--EXPECT--
Test Validate_IN
****************
Test Region
AN: YES
AP: YES
AR: YES
AS: YES
BR: YES
CH: YES
CT: YES
DN: YES
DD: YES
DL: YES
GA: YES
GJ: YES
HR: YES
HP: YES
JK: YES
JH: YES
KA: YES
KL: YES
LD: YES
MP: YES
MH: YES
MN: YES
ML: YES
MZ: YES
NL: YES
OR: YES
PY: YES
PB: YES
RJ: YES
SK: YES
TN: YES
TR: YES
UL: YES
UP: YES
WB: YES
IE: NO
AM: NO
BA: NO
NC: NO
IS: NO