@@ -1,29 +1,29 @@ |
||
1 | 1 | <?php |
2 | 2 | class ParentClassWithPrivateAttributes |
3 | 3 | { |
4 | - private static $privateStaticParentAttribute = 'foo'; |
|
5 | - private $privateParentAttribute = 'bar'; |
|
4 | + private static $privateStaticParentAttribute = 'foo'; |
|
5 | + private $privateParentAttribute = 'bar'; |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | class ParentClassWithProtectedAttributes extends ParentClassWithPrivateAttributes |
9 | 9 | { |
10 | - protected static $protectedStaticParentAttribute = 'foo'; |
|
11 | - protected $protectedParentAttribute = 'bar'; |
|
10 | + protected static $protectedStaticParentAttribute = 'foo'; |
|
11 | + protected $protectedParentAttribute = 'bar'; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | class ClassWithNonPublicAttributes extends ParentClassWithProtectedAttributes |
15 | 15 | { |
16 | - public static $publicStaticAttribute = 'foo'; |
|
17 | - protected static $protectedStaticAttribute = 'bar'; |
|
18 | - protected static $privateStaticAttribute = 'baz'; |
|
16 | + public static $publicStaticAttribute = 'foo'; |
|
17 | + protected static $protectedStaticAttribute = 'bar'; |
|
18 | + protected static $privateStaticAttribute = 'baz'; |
|
19 | 19 | |
20 | - public $publicAttribute = 'foo'; |
|
21 | - public $foo = 1; |
|
22 | - public $bar = 2; |
|
23 | - protected $protectedAttribute = 'bar'; |
|
24 | - protected $privateAttribute = 'baz'; |
|
20 | + public $publicAttribute = 'foo'; |
|
21 | + public $foo = 1; |
|
22 | + public $bar = 2; |
|
23 | + protected $protectedAttribute = 'bar'; |
|
24 | + protected $privateAttribute = 'baz'; |
|
25 | 25 | |
26 | - public $publicArray = ['foo']; |
|
27 | - protected $protectedArray = ['bar']; |
|
28 | - protected $privateArray = ['baz']; |
|
26 | + public $publicArray = ['foo']; |
|
27 | + protected $protectedArray = ['bar']; |
|
28 | + protected $privateArray = ['baz']; |
|
29 | 29 | } |
@@ -3,41 +3,41 @@ |
||
3 | 3 | |
4 | 4 | class ClonedDependencyTest extends TestCase |
5 | 5 | { |
6 | - private static $dependency; |
|
6 | + private static $dependency; |
|
7 | 7 | |
8 | - public static function setUpBeforeClass() |
|
9 | - { |
|
10 | - self::$dependency = new stdClass; |
|
11 | - } |
|
8 | + public static function setUpBeforeClass() |
|
9 | + { |
|
10 | + self::$dependency = new stdClass; |
|
11 | + } |
|
12 | 12 | |
13 | - public function testOne() |
|
14 | - { |
|
15 | - $this->assertTrue(true); |
|
13 | + public function testOne() |
|
14 | + { |
|
15 | + $this->assertTrue(true); |
|
16 | 16 | |
17 | - return self::$dependency; |
|
18 | - } |
|
17 | + return self::$dependency; |
|
18 | + } |
|
19 | 19 | |
20 | - /** |
|
21 | - * @depends testOne |
|
22 | - */ |
|
23 | - public function testTwo($dependency) |
|
24 | - { |
|
25 | - $this->assertSame(self::$dependency, $dependency); |
|
26 | - } |
|
20 | + /** |
|
21 | + * @depends testOne |
|
22 | + */ |
|
23 | + public function testTwo($dependency) |
|
24 | + { |
|
25 | + $this->assertSame(self::$dependency, $dependency); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * @depends !clone testOne |
|
30 | - */ |
|
31 | - public function testThree($dependency) |
|
32 | - { |
|
33 | - $this->assertSame(self::$dependency, $dependency); |
|
34 | - } |
|
28 | + /** |
|
29 | + * @depends !clone testOne |
|
30 | + */ |
|
31 | + public function testThree($dependency) |
|
32 | + { |
|
33 | + $this->assertSame(self::$dependency, $dependency); |
|
34 | + } |
|
35 | 35 | |
36 | - /** |
|
37 | - * @depends clone testOne |
|
38 | - */ |
|
39 | - public function testFour($dependency) |
|
40 | - { |
|
41 | - $this->assertNotSame(self::$dependency, $dependency); |
|
42 | - } |
|
36 | + /** |
|
37 | + * @depends clone testOne |
|
38 | + */ |
|
39 | + public function testFour($dependency) |
|
40 | + { |
|
41 | + $this->assertNotSame(self::$dependency, $dependency); |
|
42 | + } |
|
43 | 43 | } |
@@ -5,10 +5,10 @@ |
||
5 | 5 | |
6 | 6 | class BaseTestListenerSample extends BaseTestListener |
7 | 7 | { |
8 | - public $endCount = 0; |
|
8 | + public $endCount = 0; |
|
9 | 9 | |
10 | - public function endTest(Test $test, $time) |
|
11 | - { |
|
12 | - $this->endCount++; |
|
13 | - } |
|
10 | + public function endTest(Test $test, $time) |
|
11 | + { |
|
12 | + $this->endCount++; |
|
13 | + } |
|
14 | 14 | } |
@@ -3,28 +3,28 @@ |
||
3 | 3 | |
4 | 4 | class DataProviderTestDoxTest extends TestCase |
5 | 5 | { |
6 | - /** |
|
7 | - * @dataProvider provider |
|
8 | - * @testdox Does something with |
|
9 | - */ |
|
10 | - public function testOne() |
|
11 | - { |
|
12 | - $this->assertTrue(true); |
|
13 | - } |
|
6 | + /** |
|
7 | + * @dataProvider provider |
|
8 | + * @testdox Does something with |
|
9 | + */ |
|
10 | + public function testOne() |
|
11 | + { |
|
12 | + $this->assertTrue(true); |
|
13 | + } |
|
14 | 14 | |
15 | - /** |
|
16 | - * @dataProvider provider |
|
17 | - */ |
|
18 | - public function testDoesSomethingElseWith() |
|
19 | - { |
|
20 | - $this->assertTrue(true); |
|
21 | - } |
|
15 | + /** |
|
16 | + * @dataProvider provider |
|
17 | + */ |
|
18 | + public function testDoesSomethingElseWith() |
|
19 | + { |
|
20 | + $this->assertTrue(true); |
|
21 | + } |
|
22 | 22 | |
23 | - public function provider() |
|
24 | - { |
|
25 | - return [ |
|
26 | - 'one' => [1], |
|
27 | - 'two' => [2] |
|
28 | - ]; |
|
29 | - } |
|
23 | + public function provider() |
|
24 | + { |
|
25 | + return [ |
|
26 | + 'one' => [1], |
|
27 | + 'two' => [2] |
|
28 | + ]; |
|
29 | + } |
|
30 | 30 | } |
@@ -5,25 +5,25 @@ |
||
5 | 5 | |
6 | 6 | class DoubleTestCase implements Test |
7 | 7 | { |
8 | - protected $testCase; |
|
8 | + protected $testCase; |
|
9 | 9 | |
10 | - public function __construct(TestCase $testCase) |
|
11 | - { |
|
12 | - $this->testCase = $testCase; |
|
13 | - } |
|
10 | + public function __construct(TestCase $testCase) |
|
11 | + { |
|
12 | + $this->testCase = $testCase; |
|
13 | + } |
|
14 | 14 | |
15 | - public function count() |
|
16 | - { |
|
17 | - return 2; |
|
18 | - } |
|
15 | + public function count() |
|
16 | + { |
|
17 | + return 2; |
|
18 | + } |
|
19 | 19 | |
20 | - public function run(TestResult $result = null) |
|
21 | - { |
|
22 | - $result->startTest($this); |
|
20 | + public function run(TestResult $result = null) |
|
21 | + { |
|
22 | + $result->startTest($this); |
|
23 | 23 | |
24 | - $this->testCase->runBare(); |
|
25 | - $this->testCase->runBare(); |
|
24 | + $this->testCase->runBare(); |
|
25 | + $this->testCase->runBare(); |
|
26 | 26 | |
27 | - $result->endTest($this, 0); |
|
28 | - } |
|
27 | + $result->endTest($this, 0); |
|
28 | + } |
|
29 | 29 | } |
@@ -4,13 +4,13 @@ |
||
4 | 4 | */ |
5 | 5 | class IgnoreCodeCoverageClass |
6 | 6 | { |
7 | - public function returnTrue() |
|
8 | - { |
|
9 | - return true; |
|
10 | - } |
|
7 | + public function returnTrue() |
|
8 | + { |
|
9 | + return true; |
|
10 | + } |
|
11 | 11 | |
12 | - public function returnFalse() |
|
13 | - { |
|
14 | - return false; |
|
15 | - } |
|
12 | + public function returnFalse() |
|
13 | + { |
|
14 | + return false; |
|
15 | + } |
|
16 | 16 | } |
@@ -3,27 +3,27 @@ |
||
3 | 3 | |
4 | 4 | class MultiDependencyTest extends TestCase |
5 | 5 | { |
6 | - public function testOne() |
|
7 | - { |
|
8 | - $this->assertTrue(true); |
|
6 | + public function testOne() |
|
7 | + { |
|
8 | + $this->assertTrue(true); |
|
9 | 9 | |
10 | - return 'foo'; |
|
11 | - } |
|
10 | + return 'foo'; |
|
11 | + } |
|
12 | 12 | |
13 | - public function testTwo() |
|
14 | - { |
|
15 | - $this->assertTrue(true); |
|
13 | + public function testTwo() |
|
14 | + { |
|
15 | + $this->assertTrue(true); |
|
16 | 16 | |
17 | - return 'bar'; |
|
18 | - } |
|
17 | + return 'bar'; |
|
18 | + } |
|
19 | 19 | |
20 | - /** |
|
21 | - * @depends testOne |
|
22 | - * @depends testTwo |
|
23 | - */ |
|
24 | - public function testThree($a, $b) |
|
25 | - { |
|
26 | - $this->assertEquals('foo', $a); |
|
27 | - $this->assertEquals('bar', $b); |
|
28 | - } |
|
20 | + /** |
|
21 | + * @depends testOne |
|
22 | + * @depends testTwo |
|
23 | + */ |
|
24 | + public function testThree($a, $b) |
|
25 | + { |
|
26 | + $this->assertEquals('foo', $a); |
|
27 | + $this->assertEquals('bar', $b); |
|
28 | + } |
|
29 | 29 | } |
@@ -1,39 +1,39 @@ |
||
1 | 1 | <?php |
2 | 2 | class BeforeClassWithOnlyDataProviderTest extends \PHPUnit\Framework\TestCase |
3 | 3 | { |
4 | - public static $setUpBeforeClassWasCalled; |
|
5 | - public static $beforeClassWasCalled; |
|
4 | + public static $setUpBeforeClassWasCalled; |
|
5 | + public static $beforeClassWasCalled; |
|
6 | 6 | |
7 | - public static function resetProperties() |
|
8 | - { |
|
9 | - self::$setUpBeforeClassWasCalled = false; |
|
10 | - self::$beforeClassWasCalled = false; |
|
11 | - } |
|
7 | + public static function resetProperties() |
|
8 | + { |
|
9 | + self::$setUpBeforeClassWasCalled = false; |
|
10 | + self::$beforeClassWasCalled = false; |
|
11 | + } |
|
12 | 12 | |
13 | - public static function setUpBeforeClass() |
|
14 | - { |
|
15 | - self::$setUpBeforeClassWasCalled = true; |
|
16 | - } |
|
13 | + public static function setUpBeforeClass() |
|
14 | + { |
|
15 | + self::$setUpBeforeClassWasCalled = true; |
|
16 | + } |
|
17 | 17 | |
18 | - /** |
|
19 | - * @beforeClass |
|
20 | - */ |
|
21 | - public static function someAnnotatedSetupMethod() |
|
22 | - { |
|
23 | - self::$beforeClassWasCalled = true; |
|
24 | - } |
|
18 | + /** |
|
19 | + * @beforeClass |
|
20 | + */ |
|
21 | + public static function someAnnotatedSetupMethod() |
|
22 | + { |
|
23 | + self::$beforeClassWasCalled = true; |
|
24 | + } |
|
25 | 25 | |
26 | - public function dummyProvider() |
|
27 | - { |
|
28 | - return [[1]]; |
|
29 | - } |
|
26 | + public function dummyProvider() |
|
27 | + { |
|
28 | + return [[1]]; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * @dataProvider dummyProvider |
|
33 | - * delete annotation to fail test case |
|
34 | - */ |
|
35 | - public function testDummy() |
|
36 | - { |
|
37 | - $this->assertFalse(false); |
|
38 | - } |
|
31 | + /** |
|
32 | + * @dataProvider dummyProvider |
|
33 | + * delete annotation to fail test case |
|
34 | + */ |
|
35 | + public function testDummy() |
|
36 | + { |
|
37 | + $this->assertFalse(false); |
|
38 | + } |
|
39 | 39 | } |
@@ -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 | } |