Blame | Letzte Änderung | Log anzeigen | RSS feed
--TEST--validate_DE.phpt: Unit tests for 'Validate/DE.php'--FILE--<?php// $Id: validate_DE.phpt 185239 2005-04-27 04:54:56Z toggg $// Validate test script$noYes = array('NO', 'YES');require_once 'Validate/DE.php';echo "Test Validate_DE\n";echo "****************\n";$postalCodes = array( '10115', // OK'09111', // OK'80331', // OK'0115', // NOK'101154', // NOK'x1154' // NOK);$bankcodes = array( '59050101', // OK'60250010', // OK'70051805', // OK'7005180S', // NOK'7005180', // NOK'700518073' // NOK);echo "Test postalCode\n";foreach ($postalCodes as $postalCode) {echo "{$postalCode}: ".$noYes[Validate_DE::postalCode($postalCode)]."\n";}echo "Test bankcode\n";foreach ($bankcodes as $bankcode) {echo "{$bankcode}: ".$noYes[Validate_DE::bankcode($bankcode)]."\n";}?>--EXPECT--Test Validate_DE****************Test postalCode10115: YES09111: YES80331: YES0115: NO101154: NOx1154: NOTest bankcode59050101: YES60250010: YES70051805: YES7005180S: NO7005180: NO700518073: NO