-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathROFormatterTest.php
More file actions
65 lines (55 loc) · 1.51 KB
/
ROFormatterTest.php
File metadata and controls
65 lines (55 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
declare(strict_types=1);
namespace Brick\Postcode\Tests\Formatter;
use Brick\Postcode\CountryPostcodeFormatter;
use Brick\Postcode\Formatter\ROFormatter;
use Brick\Postcode\Tests\CountryPostcodeFormatterTest;
/**
* Unit tests for the RO postcode formatter.
*/
class ROFormatterTest extends CountryPostcodeFormatterTest
{
protected function getFormatter() : CountryPostcodeFormatter
{
return new ROFormatter();
}
public function providerFormat() : array
{
return [
['', null],
['1', null],
['12', null],
['123', null],
['1234', null],
['12345', null],
['123456', '123456'],
['1234567', null],
['A', null],
['AB', null],
['ABC', null],
['ABCD', null],
['ABCDE', null],
['ABCDEF', null],
// valid
['010101', '010101'],
['123456', '123456'],
['090123', '090123'],
['080456', '080456'],
['070789', '070789'],
['123450', '123450'],
['012345', '012345'],
['202020', '202020'],
// invalid
['000123', null],
['01111', null],
['000000', null],
['12ABCD', null],
['12345678', null],
['01 234 56', null],
['0300!', null],
['999999', null],
['12 345', null],
['07-089', null]
];
}
}