@@ -3,11 +3,11 @@ |
||
3 | 3 | |
4 | 4 | class CoverageFunctionTest 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 | } |
@@ -1,33 +1,33 @@ |
||
1 | 1 | <?php |
2 | 2 | class BankAccount |
3 | 3 | { |
4 | - protected $balance = 0; |
|
4 | + protected $balance = 0; |
|
5 | 5 | |
6 | - public function getBalance() |
|
7 | - { |
|
8 | - return $this->balance; |
|
9 | - } |
|
6 | + public function getBalance() |
|
7 | + { |
|
8 | + return $this->balance; |
|
9 | + } |
|
10 | 10 | |
11 | - protected function setBalance($balance) |
|
12 | - { |
|
13 | - if ($balance >= 0) { |
|
14 | - $this->balance = $balance; |
|
15 | - } else { |
|
16 | - throw new RuntimeException; |
|
17 | - } |
|
18 | - } |
|
11 | + protected function setBalance($balance) |
|
12 | + { |
|
13 | + if ($balance >= 0) { |
|
14 | + $this->balance = $balance; |
|
15 | + } else { |
|
16 | + throw new RuntimeException; |
|
17 | + } |
|
18 | + } |
|
19 | 19 | |
20 | - public function depositMoney($balance) |
|
21 | - { |
|
22 | - $this->setBalance($this->getBalance() + $balance); |
|
20 | + public function depositMoney($balance) |
|
21 | + { |
|
22 | + $this->setBalance($this->getBalance() + $balance); |
|
23 | 23 | |
24 | - return $this->getBalance(); |
|
25 | - } |
|
24 | + return $this->getBalance(); |
|
25 | + } |
|
26 | 26 | |
27 | - public function withdrawMoney($balance) |
|
28 | - { |
|
29 | - $this->setBalance($this->getBalance() - $balance); |
|
27 | + public function withdrawMoney($balance) |
|
28 | + { |
|
29 | + $this->setBalance($this->getBalance() - $balance); |
|
30 | 30 | |
31 | - return $this->getBalance(); |
|
32 | - } |
|
31 | + return $this->getBalance(); |
|
32 | + } |
|
33 | 33 | } |
@@ -3,36 +3,36 @@ |
||
3 | 3 | |
4 | 4 | class CoveredParentClass |
5 | 5 | { |
6 | - private function privateMethod() |
|
7 | - { |
|
8 | - } |
|
6 | + private function privateMethod() |
|
7 | + { |
|
8 | + } |
|
9 | 9 | |
10 | - protected function protectedMethod() |
|
11 | - { |
|
12 | - $this->privateMethod(); |
|
13 | - } |
|
10 | + protected function protectedMethod() |
|
11 | + { |
|
12 | + $this->privateMethod(); |
|
13 | + } |
|
14 | 14 | |
15 | - public function publicMethod() |
|
16 | - { |
|
17 | - $this->protectedMethod(); |
|
18 | - } |
|
15 | + public function publicMethod() |
|
16 | + { |
|
17 | + $this->protectedMethod(); |
|
18 | + } |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | class CoveredClass extends CoveredParentClass |
22 | 22 | { |
23 | - private function privateMethod() |
|
24 | - { |
|
25 | - } |
|
23 | + private function privateMethod() |
|
24 | + { |
|
25 | + } |
|
26 | 26 | |
27 | - protected function protectedMethod() |
|
28 | - { |
|
29 | - parent::protectedMethod(); |
|
30 | - $this->privateMethod(); |
|
31 | - } |
|
27 | + protected function protectedMethod() |
|
28 | + { |
|
29 | + parent::protectedMethod(); |
|
30 | + $this->privateMethod(); |
|
31 | + } |
|
32 | 32 | |
33 | - public function publicMethod() |
|
34 | - { |
|
35 | - parent::publicMethod(); |
|
36 | - $this->protectedMethod(); |
|
37 | - } |
|
33 | + public function publicMethod() |
|
34 | + { |
|
35 | + parent::publicMethod(); |
|
36 | + $this->protectedMethod(); |
|
37 | + } |
|
38 | 38 | } |
@@ -3,12 +3,12 @@ |
||
3 | 3 | |
4 | 4 | class NamespaceCoverageNotPublicTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers Foo\CoveredClass::<!public> |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new Foo\CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers Foo\CoveredClass::<!public> |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + $o = new Foo\CoveredClass; |
|
12 | + $o->publicMethod(); |
|
13 | + } |
|
14 | 14 | } |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | if ($neverHappens) { |
3 | - print '*'; |
|
3 | + print '*'; |
|
4 | 4 | } |
@@ -3,12 +3,12 @@ |
||
3 | 3 | |
4 | 4 | class NamespaceCoverageClassExtendedTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers Foo\CoveredClass<extended> |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new Foo\CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers Foo\CoveredClass<extended> |
|
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 CoverageNotPrivateTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers CoveredClass::<!private> |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers CoveredClass::<!private> |
|
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 CoveragePrivateTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers CoveredClass::<private> |
|
8 | - */ |
|
9 | - public function testSomething() |
|
10 | - { |
|
11 | - $o = new CoveredClass; |
|
12 | - $o->publicMethod(); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @covers CoveredClass::<private> |
|
8 | + */ |
|
9 | + public function testSomething() |
|
10 | + { |
|
11 | + $o = new CoveredClass; |
|
12 | + $o->publicMethod(); |
|
13 | + } |
|
14 | 14 | } |
@@ -3,24 +3,24 @@ |
||
3 | 3 | |
4 | 4 | class NotExistingCoveredElementTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @covers NotExistingClass |
|
8 | - */ |
|
9 | - public function testOne() |
|
10 | - { |
|
11 | - } |
|
6 | + /** |
|
7 | + * @covers NotExistingClass |
|
8 | + */ |
|
9 | + public function testOne() |
|
10 | + { |
|
11 | + } |
|
12 | 12 | |
13 | - /** |
|
14 | - * @covers NotExistingClass::notExistingMethod |
|
15 | - */ |
|
16 | - public function testTwo() |
|
17 | - { |
|
18 | - } |
|
13 | + /** |
|
14 | + * @covers NotExistingClass::notExistingMethod |
|
15 | + */ |
|
16 | + public function testTwo() |
|
17 | + { |
|
18 | + } |
|
19 | 19 | |
20 | - /** |
|
21 | - * @covers NotExistingClass::<public> |
|
22 | - */ |
|
23 | - public function testThree() |
|
24 | - { |
|
25 | - } |
|
20 | + /** |
|
21 | + * @covers NotExistingClass::<public> |
|
22 | + */ |
|
23 | + public function testThree() |
|
24 | + { |
|
25 | + } |
|
26 | 26 | } |