diff --git a/src/Faker/Provider/Payment.php b/src/Faker/Provider/Payment.php index db8f14b178..c4c0858185 100644 --- a/src/Faker/Provider/Payment.php +++ b/src/Faker/Provider/Payment.php @@ -12,7 +12,7 @@ class Payment extends Base protected static $cardVendors = array( 'Visa', 'Visa', 'Visa', 'Visa', 'Visa', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', - 'American Express', 'Discover Card' + 'American Express', 'Discover Card', 'Visa Retired' ); /** @@ -22,25 +22,27 @@ class Payment extends Base */ protected static $cardParams = array( 'Visa' => array( - "4539########", "4539###########", - "4556########", "4556###########", - "4916########", "4916###########", - "4532########", "4532###########", - "4929########", "4929###########", - "40240071####", "40240071#######", - "4485########", "4485###########", - "4716########", "4716###########", - "4###########", "4##############" ), + 'Visa Retired' => array( + "4539########", + "4556########", + "4916########", + "4532########", + "4929########", + "40240071####", + "4485########", + "4716########", + "4###########", + ), 'MasterCard' => array( "2221###########", "23#############", diff --git a/test/Faker/Provider/PaymentTest.php b/test/Faker/Provider/PaymentTest.php index d2a4524118..966b9d63cc 100644 --- a/test/Faker/Provider/PaymentTest.php +++ b/test/Faker/Provider/PaymentTest.php @@ -48,14 +48,15 @@ public function loadLocalProviders($locale) public function testCreditCardTypeReturnsValidVendorName() { - $this->assertContains($this->faker->creditCardType, array('Visa', 'MasterCard', 'American Express', 'Discover Card')); + $this->assertContains($this->faker->creditCardType, array('Visa', 'Visa Retired', 'MasterCard', 'American Express', 'Discover Card')); } public function creditCardNumberProvider() { return array( array('Discover Card', '/^6011\d{12}$/'), - array('Visa', '/^4\d{12,15}$/'), + array('Visa', '/^4\d{15}$/'), + array('Visa Retired', '/^4\d{12}$/'), array('MasterCard', '/^(5[1-5]|2[2-7])\d{14}$/') ); }