@@ -15,10 +15,10 @@ |
||
15 | 15 | public static function providerMethod() |
16 | 16 | { |
17 | 17 | return array( |
18 | - array(0, 0, 0), |
|
19 | - array(0, 1, 1), |
|
20 | - array(1, 1, 3), |
|
21 | - array(1, 0, 1) |
|
18 | + array(0, 0, 0), |
|
19 | + array(0, 1, 1), |
|
20 | + array(1, 1, 3), |
|
21 | + array(1, 0, 1) |
|
22 | 22 | ); |
23 | 23 | } |
24 | 24 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | return ((is_scalar($expected) xor null === $expected) && |
29 | 29 | (is_scalar($actual) xor null === $actual)) |
30 | - // allow comparison between strings and objects featuring __toString() |
|
30 | + // allow comparison between strings and objects featuring __toString() |
|
31 | 31 | || (is_string($expected) && is_object($actual) && method_exists($actual, '__toString')) |
32 | 32 | || (is_object($expected) && method_exists($expected, '__toString') && is_string($actual)); |
33 | 33 | } |
@@ -27,85 +27,85 @@ discard block |
||
27 | 27 | public function acceptsFailsProvider() |
28 | 28 | { |
29 | 29 | return array( |
30 | - array(array(), null), |
|
31 | - array(null, array()), |
|
32 | - array(null, null) |
|
30 | + array(array(), null), |
|
31 | + array(null, array()), |
|
32 | + array(null, null) |
|
33 | 33 | ); |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function assertEqualsSucceedsProvider() |
37 | 37 | { |
38 | 38 | return array( |
39 | - array( |
|
39 | + array( |
|
40 | 40 | array('a' => 1, 'b' => 2), |
41 | 41 | array('b' => 2, 'a' => 1) |
42 | - ), |
|
43 | - array( |
|
42 | + ), |
|
43 | + array( |
|
44 | 44 | array(1), |
45 | 45 | array('1') |
46 | - ), |
|
47 | - array( |
|
46 | + ), |
|
47 | + array( |
|
48 | 48 | array(3, 2, 1), |
49 | 49 | array(2, 3, 1), |
50 | 50 | 0, |
51 | 51 | true |
52 | - ), |
|
53 | - array( |
|
52 | + ), |
|
53 | + array( |
|
54 | 54 | array(2.3), |
55 | 55 | array(2.5), |
56 | 56 | 0.5 |
57 | - ), |
|
58 | - array( |
|
57 | + ), |
|
58 | + array( |
|
59 | 59 | array(array(2.3)), |
60 | 60 | array(array(2.5)), |
61 | 61 | 0.5 |
62 | - ), |
|
63 | - array( |
|
62 | + ), |
|
63 | + array( |
|
64 | 64 | array(new Struct(2.3)), |
65 | 65 | array(new Struct(2.5)), |
66 | 66 | 0.5 |
67 | - ), |
|
67 | + ), |
|
68 | 68 | ); |
69 | 69 | } |
70 | 70 | |
71 | 71 | public function assertEqualsFailsProvider() |
72 | 72 | { |
73 | 73 | return array( |
74 | - array( |
|
74 | + array( |
|
75 | 75 | array(), |
76 | 76 | array(0 => 1) |
77 | - ), |
|
78 | - array( |
|
77 | + ), |
|
78 | + array( |
|
79 | 79 | array(0 => 1), |
80 | 80 | array() |
81 | - ), |
|
82 | - array( |
|
81 | + ), |
|
82 | + array( |
|
83 | 83 | array(0 => null), |
84 | 84 | array() |
85 | - ), |
|
86 | - array( |
|
85 | + ), |
|
86 | + array( |
|
87 | 87 | array(0 => 1, 1 => 2), |
88 | 88 | array(0 => 1, 1 => 3) |
89 | - ), |
|
90 | - array( |
|
89 | + ), |
|
90 | + array( |
|
91 | 91 | array('a', 'b' => array(1, 2)), |
92 | 92 | array('a', 'b' => array(2, 1)) |
93 | - ), |
|
94 | - array( |
|
93 | + ), |
|
94 | + array( |
|
95 | 95 | array(2.3), |
96 | 96 | array(4.2), |
97 | 97 | 0.5 |
98 | - ), |
|
99 | - array( |
|
98 | + ), |
|
99 | + array( |
|
100 | 100 | array(array(2.3)), |
101 | 101 | array(array(4.2)), |
102 | 102 | 0.5 |
103 | - ), |
|
104 | - array( |
|
103 | + ), |
|
104 | + array( |
|
105 | 105 | array(new Struct(2.3)), |
106 | 106 | array(new Struct(4.2)), |
107 | 107 | 0.5 |
108 | - ) |
|
108 | + ) |
|
109 | 109 | ); |
110 | 110 | } |
111 | 111 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | public function testAcceptsSucceeds() |
116 | 116 | { |
117 | 117 | $this->assertTrue( |
118 | - $this->comparator->accepts(array(), array()) |
|
118 | + $this->comparator->accepts(array(), array()) |
|
119 | 119 | ); |
120 | 120 | } |
121 | 121 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | public function testAcceptsFails($expected, $actual) |
127 | 127 | { |
128 | 128 | $this->assertFalse( |
129 | - $this->comparator->accepts($expected, $actual) |
|
129 | + $this->comparator->accepts($expected, $actual) |
|
130 | 130 | ); |
131 | 131 | } |
132 | 132 | |
@@ -155,8 +155,8 @@ discard block |
||
155 | 155 | public function testAssertEqualsFails($expected, $actual,$delta = 0.0, $canonicalize = false) |
156 | 156 | { |
157 | 157 | $this->setExpectedException( |
158 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
159 | - 'Failed asserting that two arrays are equal' |
|
158 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
159 | + 'Failed asserting that two arrays are equal' |
|
160 | 160 | ); |
161 | 161 | $this->comparator->assertEquals($expected, $actual, $delta, $canonicalize); |
162 | 162 | } |
@@ -152,7 +152,7 @@ |
||
152 | 152 | * @covers ::assertEquals |
153 | 153 | * @dataProvider assertEqualsFailsProvider |
154 | 154 | */ |
155 | - public function testAssertEqualsFails($expected, $actual,$delta = 0.0, $canonicalize = false) |
|
155 | + public function testAssertEqualsFails($expected, $actual, $delta = 0.0, $canonicalize = false) |
|
156 | 156 | { |
157 | 157 | $this->setExpectedException( |
158 | 158 | 'SebastianBergmann\\Comparator\\ComparisonFailure', |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -32,109 +32,109 @@ discard block |
||
32 | 32 | $datetime = new DateTime; |
33 | 33 | |
34 | 34 | return array( |
35 | - array($datetime, null), |
|
36 | - array(null, $datetime), |
|
37 | - array(null, null) |
|
35 | + array($datetime, null), |
|
36 | + array(null, $datetime), |
|
37 | + array(null, null) |
|
38 | 38 | ); |
39 | 39 | } |
40 | 40 | |
41 | 41 | public function assertEqualsSucceedsProvider() |
42 | 42 | { |
43 | 43 | return array( |
44 | - array( |
|
44 | + array( |
|
45 | 45 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
46 | 46 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')) |
47 | - ), |
|
48 | - array( |
|
47 | + ), |
|
48 | + array( |
|
49 | 49 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
50 | 50 | new DateTime('2013-03-29 04:13:25', new DateTimeZone('America/New_York')), |
51 | 51 | 10 |
52 | - ), |
|
53 | - array( |
|
52 | + ), |
|
53 | + array( |
|
54 | 54 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
55 | 55 | new DateTime('2013-03-29 04:14:40', new DateTimeZone('America/New_York')), |
56 | 56 | 65 |
57 | - ), |
|
58 | - array( |
|
57 | + ), |
|
58 | + array( |
|
59 | 59 | new DateTime('2013-03-29', new DateTimeZone('America/New_York')), |
60 | 60 | new DateTime('2013-03-29', new DateTimeZone('America/New_York')) |
61 | - ), |
|
62 | - array( |
|
61 | + ), |
|
62 | + array( |
|
63 | 63 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
64 | 64 | new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/Chicago')) |
65 | - ), |
|
66 | - array( |
|
65 | + ), |
|
66 | + array( |
|
67 | 67 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
68 | 68 | new DateTime('2013-03-29 03:13:49', new DateTimeZone('America/Chicago')), |
69 | 69 | 15 |
70 | - ), |
|
71 | - array( |
|
70 | + ), |
|
71 | + array( |
|
72 | 72 | new DateTime('2013-03-30', new DateTimeZone('America/New_York')), |
73 | 73 | new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago')) |
74 | - ), |
|
75 | - array( |
|
74 | + ), |
|
75 | + array( |
|
76 | 76 | new DateTime('2013-03-30', new DateTimeZone('America/New_York')), |
77 | 77 | new DateTime('2013-03-29 23:01:30', new DateTimeZone('America/Chicago')), |
78 | 78 | 100 |
79 | - ), |
|
80 | - array( |
|
79 | + ), |
|
80 | + array( |
|
81 | 81 | new DateTime('@1364616000'), |
82 | 82 | new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago')) |
83 | - ), |
|
84 | - array( |
|
83 | + ), |
|
84 | + array( |
|
85 | 85 | new DateTime('2013-03-29T05:13:35-0500'), |
86 | 86 | new DateTime('2013-03-29T04:13:35-0600') |
87 | - ) |
|
87 | + ) |
|
88 | 88 | ); |
89 | 89 | } |
90 | 90 | |
91 | 91 | public function assertEqualsFailsProvider() |
92 | 92 | { |
93 | 93 | return array( |
94 | - array( |
|
94 | + array( |
|
95 | 95 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
96 | 96 | new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')) |
97 | - ), |
|
98 | - array( |
|
97 | + ), |
|
98 | + array( |
|
99 | 99 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
100 | 100 | new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')), |
101 | 101 | 3500 |
102 | - ), |
|
103 | - array( |
|
102 | + ), |
|
103 | + array( |
|
104 | 104 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
105 | 105 | new DateTime('2013-03-29 05:13:35', new DateTimeZone('America/New_York')), |
106 | 106 | 3500 |
107 | - ), |
|
108 | - array( |
|
107 | + ), |
|
108 | + array( |
|
109 | 109 | new DateTime('2013-03-29', new DateTimeZone('America/New_York')), |
110 | 110 | new DateTime('2013-03-30', new DateTimeZone('America/New_York')) |
111 | - ), |
|
112 | - array( |
|
111 | + ), |
|
112 | + array( |
|
113 | 113 | new DateTime('2013-03-29', new DateTimeZone('America/New_York')), |
114 | 114 | new DateTime('2013-03-30', new DateTimeZone('America/New_York')), |
115 | 115 | 43200 |
116 | - ), |
|
117 | - array( |
|
116 | + ), |
|
117 | + array( |
|
118 | 118 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
119 | 119 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')), |
120 | - ), |
|
121 | - array( |
|
120 | + ), |
|
121 | + array( |
|
122 | 122 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
123 | 123 | new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')), |
124 | 124 | 3500 |
125 | - ), |
|
126 | - array( |
|
125 | + ), |
|
126 | + array( |
|
127 | 127 | new DateTime('2013-03-30', new DateTimeZone('America/New_York')), |
128 | 128 | new DateTime('2013-03-30', new DateTimeZone('America/Chicago')) |
129 | - ), |
|
130 | - array( |
|
129 | + ), |
|
130 | + array( |
|
131 | 131 | new DateTime('2013-03-29T05:13:35-0600'), |
132 | 132 | new DateTime('2013-03-29T04:13:35-0600') |
133 | - ), |
|
134 | - array( |
|
133 | + ), |
|
134 | + array( |
|
135 | 135 | new DateTime('2013-03-29T05:13:35-0600'), |
136 | 136 | new DateTime('2013-03-29T05:13:35-0500') |
137 | - ), |
|
137 | + ), |
|
138 | 138 | ); |
139 | 139 | } |
140 | 140 | |
@@ -144,10 +144,10 @@ discard block |
||
144 | 144 | public function testAcceptsSucceeds() |
145 | 145 | { |
146 | 146 | $this->assertTrue( |
147 | - $this->comparator->accepts( |
|
147 | + $this->comparator->accepts( |
|
148 | 148 | new DateTime, |
149 | 149 | new DateTime |
150 | - ) |
|
150 | + ) |
|
151 | 151 | ); |
152 | 152 | } |
153 | 153 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | public function testAcceptsFails($expected, $actual) |
159 | 159 | { |
160 | 160 | $this->assertFalse( |
161 | - $this->comparator->accepts($expected, $actual) |
|
161 | + $this->comparator->accepts($expected, $actual) |
|
162 | 162 | ); |
163 | 163 | } |
164 | 164 | |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | public function testAssertEqualsFails($expected, $actual, $delta = 0.0) |
188 | 188 | { |
189 | 189 | $this->setExpectedException( |
190 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
191 | - 'Failed asserting that two DateTime objects are equal.' |
|
190 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
191 | + 'Failed asserting that two DateTime objects are equal.' |
|
192 | 192 | ); |
193 | 193 | $this->comparator->assertEquals($expected, $actual, $delta); |
194 | 194 | } |
@@ -209,8 +209,8 @@ discard block |
||
209 | 209 | public function testSupportsDateTimeInterface() |
210 | 210 | { |
211 | 211 | $this->comparator->assertEquals( |
212 | - new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
|
213 | - new DateTimeImmutable('2013-03-29 04:13:35', new DateTimeZone('America/New_York')) |
|
212 | + new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), |
|
213 | + new DateTimeImmutable('2013-03-29 04:13:35', new DateTimeZone('America/New_York')) |
|
214 | 214 | ); |
215 | 215 | } |
216 | 216 | } |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -26,57 +26,57 @@ discard block |
||
26 | 26 | public function acceptsSucceedsProvider() |
27 | 27 | { |
28 | 28 | return array( |
29 | - array(0, 5.0), |
|
30 | - array(5.0, 0), |
|
31 | - array('5', 4.5), |
|
32 | - array(1.2e3, 7E-10), |
|
33 | - array(3, acos(8)), |
|
34 | - array(acos(8), 3), |
|
35 | - array(acos(8), acos(8)) |
|
29 | + array(0, 5.0), |
|
30 | + array(5.0, 0), |
|
31 | + array('5', 4.5), |
|
32 | + array(1.2e3, 7E-10), |
|
33 | + array(3, acos(8)), |
|
34 | + array(acos(8), 3), |
|
35 | + array(acos(8), acos(8)) |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function acceptsFailsProvider() |
40 | 40 | { |
41 | 41 | return array( |
42 | - array(5, 5), |
|
43 | - array('4.5', 5), |
|
44 | - array(0x539, 02471), |
|
45 | - array(5.0, false), |
|
46 | - array(null, 5.0) |
|
42 | + array(5, 5), |
|
43 | + array('4.5', 5), |
|
44 | + array(0x539, 02471), |
|
45 | + array(5.0, false), |
|
46 | + array(null, 5.0) |
|
47 | 47 | ); |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function assertEqualsSucceedsProvider() |
51 | 51 | { |
52 | 52 | return array( |
53 | - array(2.3, 2.3), |
|
54 | - array('2.3', 2.3), |
|
55 | - array(5.0, 5), |
|
56 | - array(5, 5.0), |
|
57 | - array(5.0, '5'), |
|
58 | - array(1.2e3, 1200), |
|
59 | - array(2.3, 2.5, 0.5), |
|
60 | - array(3, 3.05, 0.05), |
|
61 | - array(1.2e3, 1201, 1), |
|
62 | - array((string)(1/3), 1 - 2/3), |
|
63 | - array(1/3, (string)(1 - 2/3)) |
|
53 | + array(2.3, 2.3), |
|
54 | + array('2.3', 2.3), |
|
55 | + array(5.0, 5), |
|
56 | + array(5, 5.0), |
|
57 | + array(5.0, '5'), |
|
58 | + array(1.2e3, 1200), |
|
59 | + array(2.3, 2.5, 0.5), |
|
60 | + array(3, 3.05, 0.05), |
|
61 | + array(1.2e3, 1201, 1), |
|
62 | + array((string)(1/3), 1 - 2/3), |
|
63 | + array(1/3, (string)(1 - 2/3)) |
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 | |
67 | 67 | public function assertEqualsFailsProvider() |
68 | 68 | { |
69 | 69 | return array( |
70 | - array(2.3, 4.2), |
|
71 | - array('2.3', 4.2), |
|
72 | - array(5.0, '4'), |
|
73 | - array(5.0, 6), |
|
74 | - array(1.2e3, 1201), |
|
75 | - array(2.3, 2.5, 0.2), |
|
76 | - array(3, 3.05, 0.04), |
|
77 | - array(3, acos(8)), |
|
78 | - array(acos(8), 3), |
|
79 | - array(acos(8), acos(8)) |
|
70 | + array(2.3, 4.2), |
|
71 | + array('2.3', 4.2), |
|
72 | + array(5.0, '4'), |
|
73 | + array(5.0, 6), |
|
74 | + array(1.2e3, 1201), |
|
75 | + array(2.3, 2.5, 0.2), |
|
76 | + array(3, 3.05, 0.04), |
|
77 | + array(3, acos(8)), |
|
78 | + array(acos(8), 3), |
|
79 | + array(acos(8), acos(8)) |
|
80 | 80 | ); |
81 | 81 | } |
82 | 82 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | public function testAcceptsSucceeds($expected, $actual) |
88 | 88 | { |
89 | 89 | $this->assertTrue( |
90 | - $this->comparator->accepts($expected, $actual) |
|
90 | + $this->comparator->accepts($expected, $actual) |
|
91 | 91 | ); |
92 | 92 | } |
93 | 93 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | public function testAcceptsFails($expected, $actual) |
99 | 99 | { |
100 | 100 | $this->assertFalse( |
101 | - $this->comparator->accepts($expected, $actual) |
|
101 | + $this->comparator->accepts($expected, $actual) |
|
102 | 102 | ); |
103 | 103 | } |
104 | 104 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | public function testAssertEqualsFails($expected, $actual, $delta = 0.0) |
128 | 128 | { |
129 | 129 | $this->setExpectedException( |
130 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected' |
|
130 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected' |
|
131 | 131 | ); |
132 | 132 | $this->comparator->assertEquals($expected, $actual, $delta); |
133 | 133 | } |
@@ -59,8 +59,8 @@ |
||
59 | 59 | array(2.3, 2.5, 0.5), |
60 | 60 | array(3, 3.05, 0.05), |
61 | 61 | array(1.2e3, 1201, 1), |
62 | - array((string)(1/3), 1 - 2/3), |
|
63 | - array(1/3, (string)(1 - 2/3)) |
|
62 | + array((string) (1 / 3), 1 - 2 / 3), |
|
63 | + array(1 / 3, (string) (1 - 2 / 3)) |
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -30,18 +30,18 @@ discard block |
||
30 | 30 | public function acceptsSucceedsProvider() |
31 | 31 | { |
32 | 32 | return array( |
33 | - array(new Exception, new Exception), |
|
34 | - array(new RuntimeException, new RuntimeException), |
|
35 | - array(new Exception, new RuntimeException) |
|
33 | + array(new Exception, new Exception), |
|
34 | + array(new RuntimeException, new RuntimeException), |
|
35 | + array(new Exception, new RuntimeException) |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function acceptsFailsProvider() |
40 | 40 | { |
41 | 41 | return array( |
42 | - array(new Exception, null), |
|
43 | - array(null, new Exception), |
|
44 | - array(null, null) |
|
42 | + array(new Exception, null), |
|
43 | + array(null, new Exception), |
|
44 | + array(null, null) |
|
45 | 45 | ); |
46 | 46 | } |
47 | 47 | |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | $exception4 = new RunTimeException('Error', 100); |
55 | 55 | |
56 | 56 | return array( |
57 | - array($exception1, $exception1), |
|
58 | - array($exception1, $exception2), |
|
59 | - array($exception3, $exception3), |
|
60 | - array($exception3, $exception4) |
|
57 | + array($exception1, $exception1), |
|
58 | + array($exception1, $exception2), |
|
59 | + array($exception3, $exception3), |
|
60 | + array($exception3, $exception4) |
|
61 | 61 | ); |
62 | 62 | } |
63 | 63 | |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | $exception5 = new RunTimeException('Error', 101); |
75 | 75 | |
76 | 76 | return array( |
77 | - array($exception1, $exception2, $equalMessage), |
|
78 | - array($exception1, $exception3, $equalMessage), |
|
79 | - array($exception1, $exception4, $typeMessage), |
|
80 | - array($exception2, $exception3, $equalMessage), |
|
81 | - array($exception4, $exception5, $equalMessage) |
|
77 | + array($exception1, $exception2, $equalMessage), |
|
78 | + array($exception1, $exception3, $equalMessage), |
|
79 | + array($exception1, $exception4, $typeMessage), |
|
80 | + array($exception2, $exception3, $equalMessage), |
|
81 | + array($exception4, $exception5, $equalMessage) |
|
82 | 82 | ); |
83 | 83 | } |
84 | 84 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | public function testAcceptsSucceeds($expected, $actual) |
90 | 90 | { |
91 | 91 | $this->assertTrue( |
92 | - $this->comparator->accepts($expected, $actual) |
|
92 | + $this->comparator->accepts($expected, $actual) |
|
93 | 93 | ); |
94 | 94 | } |
95 | 95 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function testAcceptsFails($expected, $actual) |
101 | 101 | { |
102 | 102 | $this->assertFalse( |
103 | - $this->comparator->accepts($expected, $actual) |
|
103 | + $this->comparator->accepts($expected, $actual) |
|
104 | 104 | ); |
105 | 105 | } |
106 | 106 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | public function testAssertEqualsFails($expected, $actual, $message) |
130 | 130 | { |
131 | 131 | $this->setExpectedException( |
132 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
132 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
133 | 133 | ); |
134 | 134 | $this->comparator->assertEquals($expected, $actual); |
135 | 135 | } |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | $stdmock = $this->getMock('stdClass'); |
31 | 31 | |
32 | 32 | return array( |
33 | - array($testmock, $testmock), |
|
34 | - array($stdmock, $stdmock), |
|
35 | - array($stdmock, $testmock) |
|
33 | + array($testmock, $testmock), |
|
34 | + array($stdmock, $stdmock), |
|
35 | + array($stdmock, $testmock) |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | $stdmock = $this->getMock('stdClass'); |
42 | 42 | |
43 | 43 | return array( |
44 | - array($stdmock, null), |
|
45 | - array(null, $stdmock), |
|
46 | - array(null, null) |
|
44 | + array($stdmock, null), |
|
45 | + array(null, $stdmock), |
|
46 | + array(null, null) |
|
47 | 47 | ); |
48 | 48 | } |
49 | 49 | |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | $object2 = $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(4, 8, 15)); |
62 | 62 | |
63 | 63 | return array( |
64 | - array($object1, $object1), |
|
65 | - array($object1, $object2), |
|
66 | - array($book1, $book1), |
|
67 | - array($book1, $book2), |
|
68 | - array( |
|
64 | + array($object1, $object1), |
|
65 | + array($object1, $object2), |
|
66 | + array($book1, $book1), |
|
67 | + array($book1, $book2), |
|
68 | + array( |
|
69 | 69 | $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(2.3)), |
70 | 70 | $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(2.5)), |
71 | 71 | 0.5 |
72 | - ) |
|
72 | + ) |
|
73 | 73 | ); |
74 | 74 | } |
75 | 75 | |
@@ -95,20 +95,20 @@ discard block |
||
95 | 95 | $object2 = $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(16, 23, 42)); |
96 | 96 | |
97 | 97 | return array( |
98 | - array( |
|
98 | + array( |
|
99 | 99 | $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(4, 8, 15)), |
100 | 100 | $this->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(16, 23, 42)), |
101 | 101 | $equalMessage |
102 | - ), |
|
103 | - array($object1, $object2, $equalMessage), |
|
104 | - array($book1, $book2, $equalMessage), |
|
105 | - array($book3, $book4, $typeMessage), |
|
106 | - array( |
|
102 | + ), |
|
103 | + array($object1, $object2, $equalMessage), |
|
104 | + array($book1, $book2, $equalMessage), |
|
105 | + array($book3, $book4, $typeMessage), |
|
106 | + array( |
|
107 | 107 | $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(2.3)), |
108 | 108 | $this->getMock('SebastianBergmann\\Comparator\\Struct', null, array(4.2)), |
109 | 109 | $equalMessage, |
110 | 110 | 0.5 |
111 | - ) |
|
111 | + ) |
|
112 | 112 | ); |
113 | 113 | } |
114 | 114 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function testAcceptsSucceeds($expected, $actual) |
120 | 120 | { |
121 | 121 | $this->assertTrue( |
122 | - $this->comparator->accepts($expected, $actual) |
|
122 | + $this->comparator->accepts($expected, $actual) |
|
123 | 123 | ); |
124 | 124 | } |
125 | 125 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | public function testAcceptsFails($expected, $actual) |
131 | 131 | { |
132 | 132 | $this->assertFalse( |
133 | - $this->comparator->accepts($expected, $actual) |
|
133 | + $this->comparator->accepts($expected, $actual) |
|
134 | 134 | ); |
135 | 135 | } |
136 | 136 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0) |
160 | 160 | { |
161 | 161 | $this->setExpectedException( |
162 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
162 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
163 | 163 | ); |
164 | 164 | $this->comparator->assertEquals($expected, $actual, $delta); |
165 | 165 | } |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -26,45 +26,45 @@ discard block |
||
26 | 26 | public function acceptsSucceedsProvider() |
27 | 27 | { |
28 | 28 | return array( |
29 | - array(5, 10), |
|
30 | - array(8, '0'), |
|
31 | - array('10', 0), |
|
32 | - array(0x74c3b00c, 42), |
|
33 | - array(0755, 0777) |
|
29 | + array(5, 10), |
|
30 | + array(8, '0'), |
|
31 | + array('10', 0), |
|
32 | + array(0x74c3b00c, 42), |
|
33 | + array(0755, 0777) |
|
34 | 34 | ); |
35 | 35 | } |
36 | 36 | |
37 | 37 | public function acceptsFailsProvider() |
38 | 38 | { |
39 | 39 | return array( |
40 | - array('5', '10'), |
|
41 | - array(8, 5.0), |
|
42 | - array(5.0, 8), |
|
43 | - array(10, null), |
|
44 | - array(false, 12) |
|
40 | + array('5', '10'), |
|
41 | + array(8, 5.0), |
|
42 | + array(5.0, 8), |
|
43 | + array(10, null), |
|
44 | + array(false, 12) |
|
45 | 45 | ); |
46 | 46 | } |
47 | 47 | |
48 | 48 | public function assertEqualsSucceedsProvider() |
49 | 49 | { |
50 | 50 | return array( |
51 | - array(1337, 1337), |
|
52 | - array('1337', 1337), |
|
53 | - array(0x539, 1337), |
|
54 | - array(02471, 1337), |
|
55 | - array(1337, 1338, 1), |
|
56 | - array('1337', 1340, 5), |
|
51 | + array(1337, 1337), |
|
52 | + array('1337', 1337), |
|
53 | + array(0x539, 1337), |
|
54 | + array(02471, 1337), |
|
55 | + array(1337, 1338, 1), |
|
56 | + array('1337', 1340, 5), |
|
57 | 57 | ); |
58 | 58 | } |
59 | 59 | |
60 | 60 | public function assertEqualsFailsProvider() |
61 | 61 | { |
62 | 62 | return array( |
63 | - array(1337, 1338), |
|
64 | - array('1338', 1337), |
|
65 | - array(0x539, 1338), |
|
66 | - array(1337, 1339, 1), |
|
67 | - array('1337', 1340, 2), |
|
63 | + array(1337, 1338), |
|
64 | + array('1338', 1337), |
|
65 | + array(0x539, 1338), |
|
66 | + array(1337, 1339, 1), |
|
67 | + array('1337', 1340, 2), |
|
68 | 68 | ); |
69 | 69 | } |
70 | 70 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function testAcceptsSucceeds($expected, $actual) |
76 | 76 | { |
77 | 77 | $this->assertTrue( |
78 | - $this->comparator->accepts($expected, $actual) |
|
78 | + $this->comparator->accepts($expected, $actual) |
|
79 | 79 | ); |
80 | 80 | } |
81 | 81 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | public function testAcceptsFails($expected, $actual) |
87 | 87 | { |
88 | 88 | $this->assertFalse( |
89 | - $this->comparator->accepts($expected, $actual) |
|
89 | + $this->comparator->accepts($expected, $actual) |
|
90 | 90 | ); |
91 | 91 | } |
92 | 92 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | public function testAssertEqualsFails($expected, $actual, $delta = 0.0) |
116 | 116 | { |
117 | 117 | $this->setExpectedException( |
118 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected' |
|
118 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected' |
|
119 | 119 | ); |
120 | 120 | $this->comparator->assertEquals($expected, $actual, $delta); |
121 | 121 | } |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |
@@ -29,18 +29,18 @@ discard block |
||
29 | 29 | public function acceptsSucceedsProvider() |
30 | 30 | { |
31 | 31 | return array( |
32 | - array(new TestClass, new TestClass), |
|
33 | - array(new stdClass, new stdClass), |
|
34 | - array(new stdClass, new TestClass) |
|
32 | + array(new TestClass, new TestClass), |
|
33 | + array(new stdClass, new stdClass), |
|
34 | + array(new stdClass, new TestClass) |
|
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function acceptsFailsProvider() |
39 | 39 | { |
40 | 40 | return array( |
41 | - array(new stdClass, null), |
|
42 | - array(null, new stdClass), |
|
43 | - array(null, null) |
|
41 | + array(new stdClass, null), |
|
42 | + array(null, new stdClass), |
|
43 | + array(null, null) |
|
44 | 44 | ); |
45 | 45 | } |
46 | 46 | |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | $object2 = new SampleClass(4, 8, 15); |
59 | 59 | |
60 | 60 | return array( |
61 | - array($object1, $object1), |
|
62 | - array($object1, $object2), |
|
63 | - array($book1, $book1), |
|
64 | - array($book1, $book2), |
|
65 | - array(new Struct(2.3), new Struct(2.5), 0.5) |
|
61 | + array($object1, $object1), |
|
62 | + array($object1, $object2), |
|
63 | + array($book1, $book1), |
|
64 | + array($book1, $book2), |
|
65 | + array(new Struct(2.3), new Struct(2.5), 0.5) |
|
66 | 66 | ); |
67 | 67 | } |
68 | 68 | |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | $object2 = new SampleClass(16, 23, 42); |
89 | 89 | |
90 | 90 | return array( |
91 | - array(new SampleClass(4, 8, 15), new SampleClass(16, 23, 42), $equalMessage), |
|
92 | - array($object1, $object2, $equalMessage), |
|
93 | - array($book1, $book2, $equalMessage), |
|
94 | - array($book3, $book4, $typeMessage), |
|
95 | - array(new Struct(2.3), new Struct(4.2), $equalMessage, 0.5) |
|
91 | + array(new SampleClass(4, 8, 15), new SampleClass(16, 23, 42), $equalMessage), |
|
92 | + array($object1, $object2, $equalMessage), |
|
93 | + array($book1, $book2, $equalMessage), |
|
94 | + array($book3, $book4, $typeMessage), |
|
95 | + array(new Struct(2.3), new Struct(4.2), $equalMessage, 0.5) |
|
96 | 96 | ); |
97 | 97 | } |
98 | 98 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | public function testAcceptsSucceeds($expected, $actual) |
104 | 104 | { |
105 | 105 | $this->assertTrue( |
106 | - $this->comparator->accepts($expected, $actual) |
|
106 | + $this->comparator->accepts($expected, $actual) |
|
107 | 107 | ); |
108 | 108 | } |
109 | 109 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | public function testAcceptsFails($expected, $actual) |
115 | 115 | { |
116 | 116 | $this->assertFalse( |
117 | - $this->comparator->accepts($expected, $actual) |
|
117 | + $this->comparator->accepts($expected, $actual) |
|
118 | 118 | ); |
119 | 119 | } |
120 | 120 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0) |
144 | 144 | { |
145 | 145 | $this->setExpectedException( |
146 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
146 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', $message |
|
147 | 147 | ); |
148 | 148 | $this->comparator->assertEquals($expected, $actual, $delta); |
149 | 149 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $book4 = new stdClass; |
85 | 85 | $book4->author = 'Terry Pratchett'; |
86 | 86 | |
87 | - $object1 = new SampleClass( 4, 8, 15); |
|
87 | + $object1 = new SampleClass(4, 8, 15); |
|
88 | 88 | $object2 = new SampleClass(16, 23, 42); |
89 | 89 | |
90 | 90 | return array( |
@@ -84,9 +84,7 @@ |
||
84 | 84 | |
85 | 85 | try { |
86 | 86 | $this->comparator->assertEquals($expected, $actual); |
87 | - } |
|
88 | - |
|
89 | - catch (ComparisonFailure $exception) { |
|
87 | + } catch (ComparisonFailure $exception) { |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $this->assertNull($exception, 'Unexpected ComparisonFailure'); |