Esempio n. 1
0
    print " - iban_get_nationalchecksum_part() test #{$i}... ";
    $received_output = iban_get_nationalchecksum_part($input);
    if ($received_output != $expected_output) {
        print "FAILED (expected '{$expected_output}', received '{$received_output}')\n";
        exit(1);
    } else {
        print "OK.\n";
    }
    $i++;
}
# === iban_country_get_iana ==================================
$test_data = array('AA' => '', 'XK' => '', 'BL' => '', 'MF' => '', 'MQ' => 'mq', 'GB' => 'uk');
$i = 0;
foreach ($test_data as $input => $expected_output) {
    print " - iban_country_get_iana() test #{$i}... ";
    $received_output = iban_country_get_iana($input);
    if ($received_output != $expected_output) {
        print "FAILED (expected '{$expected_output}', received '{$received_output}')\n";
        exit(1);
    } else {
        print "OK.\n";
    }
    $i++;
}
# === iban_country_get_iso3166 ==============================
$test_data = array('AA' => '', 'XK' => '', 'GB' => 'GB');
$i = 0;
foreach ($test_data as $input => $expected_output) {
    print " - iban_country_get_iso3166() test #{$i}... ";
    $received_output = iban_country_get_iso3166($input);
    if ($received_output != $expected_output) {
Esempio n. 2
0
 public function IANA()
 {
     return iban_country_get_iana($this->code);
 }