Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 54 lines (50 sloc) 2.016 kB
eec0616 @Moosh-be * Add new method to validate structured Bank Transfert Messages
Moosh-be authored
1 --TEST--
2 validate_BE_bank_transfer_message.phpt: Unit tests for bank transfert message method 'Validate/BE.php'
3 --FILE--
4 <?php
733cc14 @kenguest Bug #11868 tests of functions don't work when tests run from CVS.
kenguest authored
5 include (dirname(__FILE__).'/validate_functions.inc');
6 if (is_file(dirname(__FILE__) . '/../Validate/BE.php')) {
7 require_once dirname(__FILE__) . '/../Validate/BE.php';
8 $dataDir = dirname(__FILE__) . '/../data';
9 } else {
10 require_once 'Validate/BE.php';
11 $dataDir = null;
12 }
eec0616 @Moosh-be * Add new method to validate structured Bank Transfert Messages
Moosh-be authored
13
14 echo "Test bank Transfer Message Validate_BE\n";
15 echo "**************************************\n";
16
17
6d10695 @Moosh-be - remove some unusefull comments
Moosh-be authored
18 $bankTransferMessageList = array( '054/3140/16211' => 'OK'
19 , '053/3140/16211' => 'KO'
20 , '054.3140.16211' => 'OK'
21 , '053.3140.16211' => 'KO'
22 , '054-3140-16211' => 'OK'
23 , '053-3140-16211' => 'KO'
24 , '054 3140 16211' => 'OK'
25 , '053 3140 16211' => 'KO'
26 , '054314016211' => 'OK'
27 , '053314016211' => 'KO'
28 , '54314016211' => 'KO'
eec0616 @Moosh-be * Add new method to validate structured Bank Transfert Messages
Moosh-be authored
29 );
1056907 @Moosh-be - use new lib
Moosh-be authored
30 $errorFound = false;
31 $errorFound = $errorFound || test_func(array('validate_BE','bankTransferMessage'), $bankTransferMessageList );
32 echo ($errorFound) ? '... FAILED' : '... SUCCESS';
eec0616 @Moosh-be * Add new method to validate structured Bank Transfert Messages
Moosh-be authored
33 ?>
34 --EXPECT--
35 Test bank Transfer Message Validate_BE
36 **************************************
37 ---------
1056907 @Moosh-be - use new lib
Moosh-be authored
38 Test validate_BE::bankTransferMessage
eec0616 @Moosh-be * Add new method to validate structured Bank Transfert Messages
Moosh-be authored
39 _ Value State Return
40 V = validation result is right
41 X = validation result is wrong
42 V 054/3140/16211 : OK OK
43 V 053/3140/16211 : KO KO
44 V 054.3140.16211 : OK OK
45 V 053.3140.16211 : KO KO
46 V 054-3140-16211 : OK OK
47 V 053-3140-16211 : KO KO
48 V 054 3140 16211 : OK OK
49 V 053 3140 16211 : KO KO
50 V 054314016211 : OK OK
51 V 053314016211 : KO KO
52 V 54314016211 : KO KO
733cc14 @kenguest Bug #11868 tests of functions don't work when tests run from CVS.
kenguest authored
53 ... SUCCESS
Something went wrong with that request. Please try again.