Skip to content

Commit e23fa9d

Browse files
committed
Randomize test card details to prevent hard coded tests
1 parent 52ea33e commit e23fa9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Omnipay/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ public function getValidCard()
120120
'firstName' => 'Example',
121121
'lastName' => 'User',
122122
'number' => '4111111111111111',
123-
'expiryMonth' => '12',
124-
'expiryYear' => '2020',
125-
'cvv' => '123',
123+
'expiryMonth' => rand(1, 12),
124+
'expiryYear' => date('Y') + rand(1, 5),
125+
'cvv' => rand(100, 999),
126126
);
127127
}
128128

0 commit comments

Comments
 (0)