@@ -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,24 +3,24 @@ |
||
3 | 3 | |
4 | 4 | class TestWithTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @testWith [0, 0, 0] |
|
8 | - * [0, 1, 1] |
|
9 | - * [1, 2, 3] |
|
10 | - * [20, 22, 42] |
|
11 | - */ |
|
12 | - public function testAdd($a, $b, $c) |
|
13 | - { |
|
14 | - $this->assertEquals($c, $a + $b); |
|
15 | - } |
|
6 | + /** |
|
7 | + * @testWith [0, 0, 0] |
|
8 | + * [0, 1, 1] |
|
9 | + * [1, 2, 3] |
|
10 | + * [20, 22, 42] |
|
11 | + */ |
|
12 | + public function testAdd($a, $b, $c) |
|
13 | + { |
|
14 | + $this->assertEquals($c, $a + $b); |
|
15 | + } |
|
16 | 16 | |
17 | - public static function providerMethod() |
|
18 | - { |
|
19 | - return [ |
|
20 | - [0, 0, 0], |
|
21 | - [0, 1, 1], |
|
22 | - [1, 1, 3], |
|
23 | - [1, 0, 1] |
|
24 | - ]; |
|
25 | - } |
|
17 | + public static function providerMethod() |
|
18 | + { |
|
19 | + return [ |
|
20 | + [0, 0, 0], |
|
21 | + [0, 1, 1], |
|
22 | + [1, 1, 3], |
|
23 | + [1, 0, 1] |
|
24 | + ]; |
|
25 | + } |
|
26 | 26 | } |
@@ -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 | } |
@@ -13,13 +13,13 @@ |
||
13 | 13 | */ |
14 | 14 | class Author |
15 | 15 | { |
16 | - // the order of properties is important for testing the cycle! |
|
17 | - public $books = []; |
|
16 | + // the order of properties is important for testing the cycle! |
|
17 | + public $books = []; |
|
18 | 18 | |
19 | - private $name = ''; |
|
19 | + private $name = ''; |
|
20 | 20 | |
21 | - public function __construct($name) |
|
22 | - { |
|
23 | - $this->name = $name; |
|
24 | - } |
|
21 | + public function __construct($name) |
|
22 | + { |
|
23 | + $this->name = $name; |
|
24 | + } |
|
25 | 25 | } |
@@ -3,27 +3,27 @@ |
||
3 | 3 | |
4 | 4 | class OutputTestCase extends TestCase |
5 | 5 | { |
6 | - public function testExpectOutputStringFooActualFoo() |
|
7 | - { |
|
8 | - $this->expectOutputString('foo'); |
|
9 | - print 'foo'; |
|
10 | - } |
|
6 | + public function testExpectOutputStringFooActualFoo() |
|
7 | + { |
|
8 | + $this->expectOutputString('foo'); |
|
9 | + print 'foo'; |
|
10 | + } |
|
11 | 11 | |
12 | - public function testExpectOutputStringFooActualBar() |
|
13 | - { |
|
14 | - $this->expectOutputString('foo'); |
|
15 | - print 'bar'; |
|
16 | - } |
|
12 | + public function testExpectOutputStringFooActualBar() |
|
13 | + { |
|
14 | + $this->expectOutputString('foo'); |
|
15 | + print 'bar'; |
|
16 | + } |
|
17 | 17 | |
18 | - public function testExpectOutputRegexFooActualFoo() |
|
19 | - { |
|
20 | - $this->expectOutputRegex('/foo/'); |
|
21 | - print 'foo'; |
|
22 | - } |
|
18 | + public function testExpectOutputRegexFooActualFoo() |
|
19 | + { |
|
20 | + $this->expectOutputRegex('/foo/'); |
|
21 | + print 'foo'; |
|
22 | + } |
|
23 | 23 | |
24 | - public function testExpectOutputRegexFooActualBar() |
|
25 | - { |
|
26 | - $this->expectOutputRegex('/foo/'); |
|
27 | - print 'bar'; |
|
28 | - } |
|
24 | + public function testExpectOutputRegexFooActualBar() |
|
25 | + { |
|
26 | + $this->expectOutputRegex('/foo/'); |
|
27 | + print 'bar'; |
|
28 | + } |
|
29 | 29 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | class InheritedTestCase extends OneTestCase |
3 | 3 | { |
4 | - public function test2() |
|
5 | - { |
|
6 | - } |
|
4 | + public function test2() |
|
5 | + { |
|
6 | + } |
|
7 | 7 | } |
@@ -4,35 +4,35 @@ |
||
4 | 4 | |
5 | 5 | class ExceptionNamespaceTest extends \PHPUnit\Framework\TestCase |
6 | 6 | { |
7 | - /** |
|
8 | - * Exception message |
|
9 | - * |
|
10 | - * @var string |
|
11 | - */ |
|
12 | - const ERROR_MESSAGE = 'Exception namespace message'; |
|
7 | + /** |
|
8 | + * Exception message |
|
9 | + * |
|
10 | + * @var string |
|
11 | + */ |
|
12 | + const ERROR_MESSAGE = 'Exception namespace message'; |
|
13 | 13 | |
14 | - /** |
|
15 | - * Exception code |
|
16 | - * |
|
17 | - * @var int |
|
18 | - */ |
|
19 | - const ERROR_CODE = 200; |
|
14 | + /** |
|
15 | + * Exception code |
|
16 | + * |
|
17 | + * @var int |
|
18 | + */ |
|
19 | + const ERROR_CODE = 200; |
|
20 | 20 | |
21 | - /** |
|
22 | - * @expectedException Class |
|
23 | - * @expectedExceptionMessage My\Space\ExceptionNamespaceTest::ERROR_MESSAGE |
|
24 | - * @expectedExceptionCode My\Space\ExceptionNamespaceTest::ERROR_CODE |
|
25 | - */ |
|
26 | - public function testConstants() |
|
27 | - { |
|
28 | - } |
|
21 | + /** |
|
22 | + * @expectedException Class |
|
23 | + * @expectedExceptionMessage My\Space\ExceptionNamespaceTest::ERROR_MESSAGE |
|
24 | + * @expectedExceptionCode My\Space\ExceptionNamespaceTest::ERROR_CODE |
|
25 | + */ |
|
26 | + public function testConstants() |
|
27 | + { |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * @expectedException Class |
|
32 | - * @expectedExceptionCode My\Space\ExceptionNamespaceTest::UNKNOWN_CODE_CONSTANT |
|
33 | - * @expectedExceptionMessage My\Space\ExceptionNamespaceTest::UNKNOWN_MESSAGE_CONSTANT |
|
34 | - */ |
|
35 | - public function testUnknownConstants() |
|
36 | - { |
|
37 | - } |
|
30 | + /** |
|
31 | + * @expectedException Class |
|
32 | + * @expectedExceptionCode My\Space\ExceptionNamespaceTest::UNKNOWN_CODE_CONSTANT |
|
33 | + * @expectedExceptionMessage My\Space\ExceptionNamespaceTest::UNKNOWN_MESSAGE_CONSTANT |
|
34 | + */ |
|
35 | + public function testUnknownConstants() |
|
36 | + { |
|
37 | + } |
|
38 | 38 | } |
@@ -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 | } |
@@ -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 | } |