Permalink
Browse files

Split Validate_FI into its own repository.

  • Loading branch information...
1 parent a3d881e commit b1e3efb0b27f6f9689c7a19fde0b043c88c88f7a @gauthierm gauthierm committed Apr 2, 2013
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.7.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Validate_FI</name>
- <channel>pear.php.net</channel>
- <summary>Validation class for Finland</summary>
- <description>Package containes locale validation for Finland such as:
- * Postal Code
- * Telephone Number
- * Car License Plate Number
- * Motorbike License Plate Number
- * Personal Identity Number (HETU)
- * Unique Identification Number (SATU)
- * Business ID Number (Y-tunnus)
- * Party Identification Number (OVT-tunnus)
- * Value Added Tax Number (ALV-numero)
- * Bank Account Number (tilinumero)
- * Bank Reference Number (viitenumero)
- * Credit Card Number</description>
- <lead>
- <name>Jani Mikkonen</name>
- <user>janisto</user>
- <email>jani@mikkonen.info</email>
- <active>yes</active>
- </lead>
- <date>2010-08-21</date>
- <time>15:36:21</time>
- <version>
- <release>1.0.0</release>
- <api>1.0.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD</license>
- <notes>* Package has been stable for a long time and now it&apos;s compatible with PHP 5.3.
-* Fix Bug #17776: Uses deprecated functions ereg() and ereg_replace()
-* Fix Bug #17775: Uses deprecated function split()
-* Fix Bug #17756: Avoiding ereg
-* Fix Bug #11531: phpcs/codesniffer found 91 errors and 14 warnings in FI.php
-* tests should run ok when run in SVN directory</notes>
- <contents>
- <dir name="/">
- <file md5sum="182e1ee3d81e8286a5cd040c58e12b50" name="Validate/FI.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="de16083506eb008f9cd86cedb1568c47" name="tests/validate_FI_postalCode.phpt" role="test" />
- <file md5sum="c74bf30f2847f79bd8119a4d34f6bc84" name="tests/validate_FI_phoneNumber.phpt" role="test" />
- <file md5sum="9efcaa1da0dbc6779345296500b1f71a" name="tests/validate_FI_carLicensePlate.phpt" role="test" />
- <file md5sum="a42b14181d19020fe6408209838ce7c8" name="tests/validate_FI_bikeLicensePlate.phpt" role="test" />
- <file md5sum="2c9dd14b226a86f91411bcc48e5b7816" name="tests/validate_FI_pin.phpt" role="test" />
- <file md5sum="076cc520c1258edacbf337099d85fb54" name="tests/validate_FI_finuid.phpt" role="test" />
- <file md5sum="de1c7119e1939952a937647c5da3f72e" name="tests/validate_FI_businessId.phpt" role="test" />
- <file md5sum="b9e4ebbef4b723073d45ce73c278bc9e" name="tests/validate_FI_partyId.phpt" role="test" />
- <file md5sum="1ebfc3983ec1b27be73cc245633a8d26" name="tests/validate_FI_vatNumber.phpt" role="test" />
- <file md5sum="8d509aefaa88d249ef6c6ece76fb89c9" name="tests/validate_FI_bankAccount.phpt" role="test" />
- <file md5sum="eb8b0dd201512423b3f5fb547e310fe4" name="tests/validate_FI_refNum.phpt" role="test" />
- <file md5sum="eb7bd2e72687d0d99ee7b46395a2058a" name="tests/validate_FI_creditCard.phpt" role="test" />
- <file md5sum="7073f9a84fa6da71e7a505a777dda302" name="LICENSE" role="doc" />
- </dir>
- </contents>
- <dependencies>
- <required>
- <php>
- <min>4.0.1</min>
- </php>
- <pearinstaller>
- <min>1.4.0</min>
- </pearinstaller>
- </required>
- </dependencies>
- <phprelease />
- <changelog>
- <release>
- <version>
- <release>1.0.0</release>
- <api>1.0.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2010-08-21</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD</license>
- <notes>* Package has been stable for a long time and now it&apos;s compatible with PHP 5.3.
-* Fix Bug #17776: Uses deprecated functions ereg() and ereg_replace()
-* Fix Bug #17775: Uses deprecated function split()
-* Fix Bug #17756: Avoiding ereg
-* Fix Bug #11531: phpcs/codesniffer found 91 errors and 14 warnings in FI.php
-* tests should run ok when run in SVN directory</notes>
- </release>
- <release>
- <version>
- <release>0.4.0</release>
- <api>0.4.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2007-07-05</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD</license>
- <notes>- carLicensePlate(): Added new chars and first or only number cannot be zero.
-- bikeLicensePlate(): Added new chars and first or only number cannot be zero.
-- Added new unit tests. Thanks to Markku Uttula.</notes>
- </release>
- <release>
- <version>
- <release>0.3.0</release>
- <api>0.3.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2007-06-01</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD</license>
- <notes>- Minor changes in documentation + copyright
-- Check Code fixes (Variable &apos;regs&apos; is used before it was assigned.).
-- Move to beta</notes>
- </release>
- <release>
- <version>
- <release>0.2.0</release>
- <api>0.2.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2006-11-08</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD</license>
- <notes>- BC break: Renamed carReg() to carLicensePlate()
-- BC break: Renamed bikeReg() to bikeLicensePlate()
-- BC break: pin() retuns array containing gender and date of birth if optional param is true
-- Fixed some typos and rewrote parts of the code
-- Added unit tests for all public methods
-- Proper API documentation
-- Change package.xml to version 2
-- Removed str_pad extension requirement (typo)</notes>
- </release>
- <release>
- <version>
- <release>0.1.0</release>
- <api>0.1.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2006-10-26</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD</license>
- <notes>- Initial release</notes>
- </release>
- </changelog>
-</package>
@@ -1,49 +0,0 @@
---TEST--
-validate_FI_bankAccount.phpt: Unit tests for bankAccount method 'Validate/FI.php'
---FILE--
-<?php
-// $Id$
-// Validate test script
-$noYes = array('NO', 'YES');
-if (is_file(dirname(__FILE__) . '/../Validate/FI.php')) {
- require_once dirname(__FILE__) . '/../Validate/FI.php';
-} else {
- require_once 'Validate/FI.php';
-}
-
-echo "Test Validate_FI\n";
-echo "****************\n";
-
-$bankAccounts = array('159030-776', // OK
- '12345-1', // NOK
- '12345-12345', // NOK
- '123456-1', // NOK
- '123456-123456789', // NOK
- '159030-6776', // NOK
- '759030-776', // NOK
- '0', // NOK
- '-1', // NOK
- 'valid' // NOK
-);
-
-echo "\nTest bankAccount\n";
-foreach ($bankAccounts as $bankAccount) {
- echo "{$bankAccount}: ".$noYes[Validate_FI::bankAccount($bankAccount)]."\n";
-}
-
-?>
---EXPECT--
-Test Validate_FI
-****************
-
-Test bankAccount
-159030-776: YES
-12345-1: NO
-12345-12345: NO
-123456-1: NO
-123456-123456789: NO
-159030-6776: NO
-759030-776: NO
-0: NO
--1: NO
-valid: NO
@@ -1,63 +0,0 @@
---TEST--
-validate_FI_bikeLicensePlate.phpt: Unit tests for bikeLicensePlate method 'Validate/FI.php'
---FILE--
-<?php
-// $Id$
-// Validate test script
-$noYes = array('NO', 'YES');
-if (is_file(dirname(__FILE__) . '/../Validate/FI.php')) {
- require_once dirname(__FILE__) . '/../Validate/FI.php';
-} else {
- require_once 'Validate/FI.php';
-}
-
-echo "Test Validate_FI\n";
-echo "****************\n";
-
-$bikeLicensePlates = array('AB123', // OK
- 'ABC123', // OK
- 'AB1', // OK
- 'ABC12', // OK
- 'AB1234', // NOK
- 'A123', // NOK
- '123123', // NOK
- '1212', // NOK
- 'abc123', // NOK
- '0', // NOK
- '-1', // NOK
- 'valid', // NOK
- 'ÅÖÄ123', // OK
- 'ÖÄ12', // OK
- 'ABC0', // NOK
- 'ABC01', // NOK
- 'ABC012' // NOK
-);
-
-echo "\nTest bikeLicensePlate\n";
-foreach ($bikeLicensePlates as $bikeLicensePlate) {
- echo "{$bikeLicensePlate}: ".$noYes[Validate_FI::bikeLicensePlate($bikeLicensePlate)]."\n";
-}
-
-?>
---EXPECT--
-Test Validate_FI
-****************
-
-Test bikeLicensePlate
-AB123: YES
-ABC123: YES
-AB1: YES
-ABC12: YES
-AB1234: NO
-A123: NO
-123123: NO
-1212: NO
-abc123: NO
-0: NO
--1: NO
-valid: NO
-ÅÖÄ123: YES
-ÖÄ12: YES
-ABC0: NO
-ABC01: NO
-ABC012: NO
@@ -1,47 +0,0 @@
---TEST--
-validate_FI_businessId.phpt: Unit tests for businessId method 'Validate/FI.php'
---FILE--
-<?php
-// $Id$
-// Validate test script
-$noYes = array('NO', 'YES');
-if (is_file(dirname(__FILE__) . '/../Validate/FI.php')) {
- require_once dirname(__FILE__) . '/../Validate/FI.php';
-} else {
- require_once 'Validate/FI.php';
-}
-
-echo "Test Validate_FI\n";
-echo "****************\n";
-
-$businessIds = array('1572860-0', // OK
- '0737546-2', // OK
- '0737546-1', // NOK
- '0737546-11', // NOK
- '0737545-2', // NOK
- '57286XX-0', // NOK
- '0', // NOK
- '-1', // NOK
- 'valid' // NOK
-);
-
-echo "\nTest businessId\n";
-foreach ($businessIds as $businessId) {
- echo "{$businessId}: ".$noYes[Validate_FI::businessId($businessId)]."\n";
-}
-
-?>
---EXPECT--
-Test Validate_FI
-****************
-
-Test businessId
-1572860-0: YES
-0737546-2: YES
-0737546-1: NO
-0737546-11: NO
-0737545-2: NO
-57286XX-0: NO
-0: NO
--1: NO
-valid: NO
Oops, something went wrong.

0 comments on commit b1e3efb

Please sign in to comment.