@@ -11,22 +11,22 @@ class ArrayMatcherTest extends \PHPUnit_Framework_TestCase
11
11
12
12
public function setUp ()
13
13
{
14
- $ this ->simpleArray = [
15
- 'users ' => [
16
- [
14
+ $ this ->simpleArray = array (
15
+ 'users ' => array (
16
+ array (
17
17
'firstName ' => 'Norbert ' ,
18
18
'lastName ' => 'Orzechowicz '
19
- ] ,
20
- [
19
+ ) ,
20
+ array (
21
21
'firstName ' => 'Michał ' ,
22
22
'lastName ' => 'Dąbrowski '
23
- ]
24
- ] ,
23
+ )
24
+ ) ,
25
25
true ,
26
26
false ,
27
27
1 ,
28
28
6.66
29
- ] ;
29
+ ) ;
30
30
}
31
31
32
32
public function test_match_arrays ()
@@ -36,21 +36,26 @@ public function test_match_arrays()
36
36
$ matcher = new ArrayMatcher ($ chain );
37
37
38
38
$ this ->assertTrue ($ matcher ->match ($ this ->simpleArray , $ this ->simpleArray ));
39
- $ this ->assertTrue ($ matcher ->match ([], [] ));
40
- $ this ->assertFalse ($ matcher ->match ($ this ->simpleArray , [] ));
39
+ $ this ->assertTrue ($ matcher ->match (array (), array () ));
40
+ $ this ->assertFalse ($ matcher ->match ($ this ->simpleArray , array () ));
41
41
$ this ->assertFalse ($ matcher ->match (['foo ' , 1 , 3 ], ['foo ' , 2 , 3 ]));
42
- $ this ->assertFalse ($ matcher ->match ($ this ->simpleArray , [ 6 , 6.66 , false , false , [ 1 , 2 , 'foo ' ], [ 'foo ' => 'bar2 ' ] , null ] ));
43
- $ this ->assertFalse ($ matcher ->match ($ this ->simpleArray , [
44
- 'users ' => [
45
- [
42
+ $ this ->assertFalse ($ matcher ->match ($ this ->simpleArray , array ( 6 , 6.66 , false , false , array ( 1 , 2 , 'foo ' ), array ( 'foo ' => 'bar2 ' ) , null ) ));
43
+ $ this ->assertFalse ($ matcher ->match ($ this ->simpleArray , array (
44
+ 'users ' => array (
45
+ array (
46
46
'firstName ' => 'Pawel ' ,
47
47
'lastName ' => 'Orzechowicz '
48
- ] ,
49
- [
48
+ ) ,
49
+ array (
50
50
'firstName ' => 'Michał ' ,
51
51
'lastName ' => 'Dąbrowski '
52
- ]
53
- ]
54
- ]));
52
+ )
53
+ ),
54
+ true ,
55
+ false ,
56
+ 1 ,
57
+ 6.66
58
+ )));
55
59
}
60
+
56
61
}
0 commit comments