Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Add 'FI' to Payment Provider #1044

Merged
merged 4 commits into from
Oct 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Faker/Provider/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Payment extends Base
'DO' => array(array('c', 4), array('n', 20)),
'EE' => array(array('n', 2), array('n', 2), array('n', 11), array('n', 1)),
'ES' => array(array('n', 4), array('n', 4), array('n', 1), array('n', 1), array('n', 10)),
'FI' => array(array('n', 6), array('n', 7), array('n', 1)),
'FR' => array(array('n', 5), array('n', 5), array('c', 11), array('n', 2)),
'GB' => array(array('a', 4), array('n', 6), array('n', 8)),
'GE' => array(array('a', 2), array('n', 16)),
Expand Down
19 changes: 19 additions & 0 deletions src/Faker/Provider/fi_FI/Payment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Faker\Provider\fi_FI;

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'FI', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
1 change: 1 addition & 0 deletions test/Faker/Provider/PaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function testRandomCard()
'DO' => '/^DO\d{2}[A-Z0-9]{4}\d{20}$/',
'EE' => '/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/',
'ES' => '/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/',
'FI' => '/^FI\d{2}\d{6}\d{7}\d{1}$/',
'FR' => '/^FR\d{2}\d{5}\d{5}[A-Z0-9]{11}\d{2}$/',
'GB' => '/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/',
'GE' => '/^GE\d{2}[A-Z]{2}\d{16}$/',
Expand Down