Skip to content

Commit 7c39f68

Browse files
✅ Add American Express CVC tests
1 parent cda3151 commit 7c39f68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Unit/CardCvcTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function it_check_cvc_by_credit_card()
1717
$this->assertTrue($this->validator('243')->passes());
1818
$this->assertTrue($this->validator('1234')->passes());
1919

20+
$this->assertTrue($this->validator('1234', new AmericanExpressTest)->passes());
21+
$this->assertFalse($this->validator('243', new AmericanExpressTest)->passes()); // American Express supports only 4 digits
22+
2023
$this->assertTrue($this->validator('243', new VisaTest)->passes());
2124
$this->assertTrue($this->validator('1234', new VisaTest)->fails()); // Visa supports only 3 digits
2225

0 commit comments

Comments
 (0)