@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | public static function truthProvider() |
13 | 13 | { |
14 | 14 | return array( |
15 | - array(true), |
|
16 | - array(true), |
|
17 | - array(true), |
|
18 | - array(true) |
|
15 | + array(true), |
|
16 | + array(true), |
|
17 | + array(true), |
|
18 | + array(true) |
|
19 | 19 | ); |
20 | 20 | } |
21 | 21 | |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | public static function falseProvider() |
31 | 31 | { |
32 | 32 | return array( |
33 | - 'false test' => array(false), |
|
34 | - 'false test 2' => array(false), |
|
35 | - 'other false test' => array(false), |
|
36 | - 'other false test2'=> array(false) |
|
33 | + 'false test' => array(false), |
|
34 | + 'false test 2' => array(false), |
|
35 | + 'other false test' => array(false), |
|
36 | + 'other false test2'=> array(false) |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 | } |
@@ -22,16 +22,16 @@ |
||
22 | 22 | $this->markTestSkipped('skipped'); |
23 | 23 | |
24 | 24 | return array( |
25 | - array(0, 0, 0), |
|
26 | - array(0, 1, 1), |
|
25 | + array(0, 0, 0), |
|
26 | + array(0, 1, 1), |
|
27 | 27 | ); |
28 | 28 | } |
29 | 29 | |
30 | 30 | public static function providerMethod() |
31 | 31 | { |
32 | 32 | return array( |
33 | - array(0, 0, 0), |
|
34 | - array(0, 1, 1), |
|
33 | + array(0, 0, 0), |
|
34 | + array(0, 1, 1), |
|
35 | 35 | ); |
36 | 36 | } |
37 | 37 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @coversDefaultClass \Foo\CoveredClass |
|
4 | - */ |
|
3 | + * @coversDefaultClass \Foo\CoveredClass |
|
4 | + */ |
|
5 | 5 | class NamespaceCoverageCoversClassTest extends PHPUnit_Framework_TestCase |
6 | 6 | { |
7 | 7 | /** |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Sample class that implements ArrayAccess copied from |
|
4 | - * http://www.php.net/manual/en/class.arrayaccess.php |
|
5 | - * with some minor changes |
|
6 | - * This class required for PHPUnit_Framework_Constraint_ArrayHasKey testing |
|
7 | - */ |
|
3 | + * Sample class that implements ArrayAccess copied from |
|
4 | + * http://www.php.net/manual/en/class.arrayaccess.php |
|
5 | + * with some minor changes |
|
6 | + * This class required for PHPUnit_Framework_Constraint_ArrayHasKey testing |
|
7 | + */ |
|
8 | 8 | class SampleArrayAccess implements ArrayAccess |
9 | 9 | { |
10 | 10 | private $container; |
@@ -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 | } |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | $node = new DOMNode; |
33 | 33 | |
34 | 34 | return array( |
35 | - array($document, $document), |
|
36 | - array($node, $node), |
|
37 | - array($document, $node), |
|
38 | - array($node, $document) |
|
35 | + array($document, $document), |
|
36 | + array($node, $node), |
|
37 | + array($document, $node), |
|
38 | + array($node, $document) |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 | |
@@ -44,57 +44,57 @@ discard block |
||
44 | 44 | $document = new DOMDocument; |
45 | 45 | |
46 | 46 | return array( |
47 | - array($document, null), |
|
48 | - array(null, $document), |
|
49 | - array(null, null) |
|
47 | + array($document, null), |
|
48 | + array(null, $document), |
|
49 | + array(null, null) |
|
50 | 50 | ); |
51 | 51 | } |
52 | 52 | |
53 | 53 | public function assertEqualsSucceedsProvider() |
54 | 54 | { |
55 | 55 | return array( |
56 | - array( |
|
56 | + array( |
|
57 | 57 | $this->createDOMDocument('<root></root>'), |
58 | 58 | $this->createDOMDocument('<root/>') |
59 | - ), |
|
60 | - array( |
|
59 | + ), |
|
60 | + array( |
|
61 | 61 | $this->createDOMDocument('<root attr="bar"></root>'), |
62 | 62 | $this->createDOMDocument('<root attr="bar"/>') |
63 | - ), |
|
64 | - array( |
|
63 | + ), |
|
64 | + array( |
|
65 | 65 | $this->createDOMDocument('<root><foo attr="bar"></foo></root>'), |
66 | 66 | $this->createDOMDocument('<root><foo attr="bar"/></root>') |
67 | - ), |
|
68 | - array( |
|
67 | + ), |
|
68 | + array( |
|
69 | 69 | $this->createDOMDocument("<root>\n <child/>\n</root>"), |
70 | 70 | $this->createDOMDocument('<root><child/></root>') |
71 | - ), |
|
71 | + ), |
|
72 | 72 | ); |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function assertEqualsFailsProvider() |
76 | 76 | { |
77 | 77 | return array( |
78 | - array( |
|
78 | + array( |
|
79 | 79 | $this->createDOMDocument('<root></root>'), |
80 | 80 | $this->createDOMDocument('<bar/>') |
81 | - ), |
|
82 | - array( |
|
81 | + ), |
|
82 | + array( |
|
83 | 83 | $this->createDOMDocument('<foo attr1="bar"/>'), |
84 | 84 | $this->createDOMDocument('<foo attr1="foobar"/>') |
85 | - ), |
|
86 | - array( |
|
85 | + ), |
|
86 | + array( |
|
87 | 87 | $this->createDOMDocument('<foo> bar </foo>'), |
88 | 88 | $this->createDOMDocument('<foo />') |
89 | - ), |
|
90 | - array( |
|
89 | + ), |
|
90 | + array( |
|
91 | 91 | $this->createDOMDocument('<foo xmlns="urn:myns:bar"/>'), |
92 | 92 | $this->createDOMDocument('<foo xmlns="urn:notmyns:bar"/>') |
93 | - ), |
|
94 | - array( |
|
93 | + ), |
|
94 | + array( |
|
95 | 95 | $this->createDOMDocument('<foo> bar </foo>'), |
96 | 96 | $this->createDOMDocument('<foo> bir </foo>') |
97 | - ) |
|
97 | + ) |
|
98 | 98 | ); |
99 | 99 | } |
100 | 100 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | public function testAcceptsSucceeds($expected, $actual) |
115 | 115 | { |
116 | 116 | $this->assertTrue( |
117 | - $this->comparator->accepts($expected, $actual) |
|
117 | + $this->comparator->accepts($expected, $actual) |
|
118 | 118 | ); |
119 | 119 | } |
120 | 120 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | public function testAcceptsFails($expected, $actual) |
126 | 126 | { |
127 | 127 | $this->assertFalse( |
128 | - $this->comparator->accepts($expected, $actual) |
|
128 | + $this->comparator->accepts($expected, $actual) |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 | |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | public function testAssertEqualsFails($expected, $actual) |
155 | 155 | { |
156 | 156 | $this->setExpectedException( |
157 | - 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
158 | - 'Failed asserting that two DOM' |
|
157 | + 'SebastianBergmann\\Comparator\\ComparisonFailure', |
|
158 | + 'Failed asserting that two DOM' |
|
159 | 159 | ); |
160 | 160 | $this->comparator->assertEquals($expected, $actual); |
161 | 161 | } |
@@ -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 | } |