@@ -3,12 +3,12 @@ |
||
3 | 3 | |
4 | 4 | class NamespaceCoverageMethodTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers Foo\CoveredClass::publicMethod |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new Foo\CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers Foo\CoveredClass::publicMethod |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + $o = new Foo\CoveredClass; |
|
12 | + $o->publicMethod(); |
|
13 | + } |
|
14 | 14 | } |
@@ -3,12 +3,12 @@ |
||
3 | 3 | |
4 | 4 | class NamespaceCoverageProtectedTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers Foo\CoveredClass::<protected> |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new Foo\CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers Foo\CoveredClass::<protected> |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + $o = new Foo\CoveredClass; |
|
12 | + $o->publicMethod(); |
|
13 | + } |
|
14 | 14 | } |
@@ -3,13 +3,13 @@ |
||
3 | 3 | |
4 | 4 | class CoverageNothingTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers CoveredClass::publicMethod |
|
8 | - * @coversNothing |
|
9 | - */ |
|
10 | - public function testSomething() |
|
11 | - { |
|
12 | - $o = new CoveredClass; |
|
13 | - $o->publicMethod(); |
|
14 | - } |
|
6 | + /** |
|
7 | + * @covers CoveredClass::publicMethod |
|
8 | + * @coversNothing |
|
9 | + */ |
|
10 | + public function testSomething() |
|
11 | + { |
|
12 | + $o = new CoveredClass; |
|
13 | + $o->publicMethod(); |
|
14 | + } |
|
15 | 15 | } |
@@ -3,12 +3,12 @@ |
||
3 | 3 | |
4 | 4 | class CoverageMethodParenthesesWhitespaceTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers CoveredClass::publicMethod ( ) |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers CoveredClass::publicMethod ( ) |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + $o = new CoveredClass; |
|
12 | + $o->publicMethod(); |
|
13 | + } |
|
14 | 14 | } |
@@ -3,12 +3,12 @@ |
||
3 | 3 | |
4 | 4 | class CoverageMethodParenthesesTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers CoveredClass::publicMethod() |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers CoveredClass::publicMethod() |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + $o = new CoveredClass; |
|
12 | + $o->publicMethod(); |
|
13 | + } |
|
14 | 14 | } |
@@ -3,11 +3,11 @@ |
||
3 | 3 | |
4 | 4 | class CoverageFunctionParenthesesWhitespaceTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers ::globalFunction ( ) |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - globalFunction(); |
|
12 | - } |
|
6 | + /** |
|
7 | + * @covers ::globalFunction ( ) |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + globalFunction(); |
|
12 | + } |
|
13 | 13 | } |
@@ -13,8 +13,8 @@ |
||
13 | 13 | */ |
14 | 14 | function &foo($bar) |
15 | 15 | { |
16 | - $baz = function () {}; |
|
17 | - $a = true ? true : false; |
|
18 | - $b = "{$a}"; |
|
19 | - $c = "${b}"; |
|
16 | + $baz = function () {}; |
|
17 | + $a = true ? true : false; |
|
18 | + $b = "{$a}"; |
|
19 | + $c = "${b}"; |
|
20 | 20 | } |
@@ -6,17 +6,17 @@ |
||
6 | 6 | */ |
7 | 7 | class NamespaceCoverageCoversClassTest extends TestCase |
8 | 8 | { |
9 | - /** |
|
10 | - * @covers ::privateMethod |
|
11 | - * @covers ::protectedMethod |
|
12 | - * @covers ::publicMethod |
|
13 | - * @covers \Foo\CoveredParentClass::privateMethod |
|
14 | - * @covers \Foo\CoveredParentClass::protectedMethod |
|
15 | - * @covers \Foo\CoveredParentClass::publicMethod |
|
16 | - */ |
|
17 | - public function testSomething() |
|
18 | - { |
|
19 | - $o = new Foo\CoveredClass; |
|
20 | - $o->publicMethod(); |
|
21 | - } |
|
9 | + /** |
|
10 | + * @covers ::privateMethod |
|
11 | + * @covers ::protectedMethod |
|
12 | + * @covers ::publicMethod |
|
13 | + * @covers \Foo\CoveredParentClass::privateMethod |
|
14 | + * @covers \Foo\CoveredParentClass::protectedMethod |
|
15 | + * @covers \Foo\CoveredParentClass::publicMethod |
|
16 | + */ |
|
17 | + public function testSomething() |
|
18 | + { |
|
19 | + $o = new Foo\CoveredClass; |
|
20 | + $o->publicMethod(); |
|
21 | + } |
|
22 | 22 | } |
@@ -15,40 +15,40 @@ |
||
15 | 15 | */ |
16 | 16 | class UnintentionallyCoveredCodeException extends RuntimeException |
17 | 17 | { |
18 | - /** |
|
19 | - * @var array |
|
20 | - */ |
|
21 | - private $unintentionallyCoveredUnits = []; |
|
22 | - |
|
23 | - /** |
|
24 | - * @param array $unintentionallyCoveredUnits |
|
25 | - */ |
|
26 | - public function __construct(array $unintentionallyCoveredUnits) |
|
27 | - { |
|
28 | - $this->unintentionallyCoveredUnits = $unintentionallyCoveredUnits; |
|
29 | - |
|
30 | - parent::__construct($this->toString()); |
|
31 | - } |
|
32 | - |
|
33 | - /** |
|
34 | - * @return array |
|
35 | - */ |
|
36 | - public function getUnintentionallyCoveredUnits() |
|
37 | - { |
|
38 | - return $this->unintentionallyCoveredUnits; |
|
39 | - } |
|
40 | - |
|
41 | - /** |
|
42 | - * @return string |
|
43 | - */ |
|
44 | - private function toString() |
|
45 | - { |
|
46 | - $message = ''; |
|
47 | - |
|
48 | - foreach ($this->unintentionallyCoveredUnits as $unit) { |
|
49 | - $message .= '- ' . $unit . "\n"; |
|
50 | - } |
|
51 | - |
|
52 | - return $message; |
|
53 | - } |
|
18 | + /** |
|
19 | + * @var array |
|
20 | + */ |
|
21 | + private $unintentionallyCoveredUnits = []; |
|
22 | + |
|
23 | + /** |
|
24 | + * @param array $unintentionallyCoveredUnits |
|
25 | + */ |
|
26 | + public function __construct(array $unintentionallyCoveredUnits) |
|
27 | + { |
|
28 | + $this->unintentionallyCoveredUnits = $unintentionallyCoveredUnits; |
|
29 | + |
|
30 | + parent::__construct($this->toString()); |
|
31 | + } |
|
32 | + |
|
33 | + /** |
|
34 | + * @return array |
|
35 | + */ |
|
36 | + public function getUnintentionallyCoveredUnits() |
|
37 | + { |
|
38 | + return $this->unintentionallyCoveredUnits; |
|
39 | + } |
|
40 | + |
|
41 | + /** |
|
42 | + * @return string |
|
43 | + */ |
|
44 | + private function toString() |
|
45 | + { |
|
46 | + $message = ''; |
|
47 | + |
|
48 | + foreach ($this->unintentionallyCoveredUnits as $unit) { |
|
49 | + $message .= '- ' . $unit . "\n"; |
|
50 | + } |
|
51 | + |
|
52 | + return $message; |
|
53 | + } |
|
54 | 54 | } |