update test to use Test::More and add hardcoded test account from auth.net, RT#22076
[Business-OnlinePayment-AuthorizeNet.git] / t / lib / test_account.pl
1 sub test_account_or_skip {
2     my($login, $password) = test_account();
3
4     unless( defined $login ) {
5         plan skip_all => "No test account";
6     }
7
8     return($login, $password);
9 }
10
11 sub test_account {
12     open TEST_ACCOUNT, "t/test_account" or return;
13     my($login, $password) = <TEST_ACCOUNT>;
14     chomp $login;
15     chomp $password;
16
17     return($login, $password);
18 }
19
20 sub expiration_date {
21     my($month, $year) = (localtime)[4,5];
22     $year++;       # So we expire next year.
23     $year %= 100;  # y2k?  What's that?
24
25     return sprintf("%02d/%02d", $month, $year);
26 }
27
28 1;