mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-24 11:59:09 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -9,8 +9,9 @@ use Faker\Provider\Base as BaseProvider;
|
||||
use Faker\Provider\DateTime as DateTimeProvider;
|
||||
use Faker\Provider\Payment as PaymentProvider;
|
||||
use Faker\Provider\Person as PersonProvider;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class PaymentTest extends \PHPUnit_Framework_TestCase
|
||||
class PaymentTest extends TestCase
|
||||
{
|
||||
private $faker;
|
||||
|
||||
@@ -47,14 +48,15 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testCreditCardTypeReturnsValidVendorName()
|
||||
{
|
||||
$this->assertTrue(in_array($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}$/')
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user