@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | public function testMethodsToMockCanBeSpecified(): void |
32 | 32 | { |
33 | 33 | $mock = $this->getMockBuilder(Mockable::class) |
34 | - ->setMethods(['mockableMethod']) |
|
35 | - ->getMock(); |
|
34 | + ->setMethods(['mockableMethod']) |
|
35 | + ->getMock(); |
|
36 | 36 | |
37 | 37 | $this->assertNull($mock->mockableMethod()); |
38 | 38 | $this->assertTrue($mock->anotherMockableMethod()); |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | public function testMockClassNameCanBeSpecified(): void |
69 | 69 | { |
70 | 70 | $mock = $this->getMockBuilder(Mockable::class) |
71 | - ->setMockClassName('ACustomClassName') |
|
72 | - ->getMock(); |
|
71 | + ->setMockClassName('ACustomClassName') |
|
72 | + ->getMock(); |
|
73 | 73 | |
74 | 74 | $this->assertInstanceOf(ACustomClassName::class, $mock); |
75 | 75 | } |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | public function testConstructorArgumentsCanBeSpecified(): void |
78 | 78 | { |
79 | 79 | $mock = $this->getMockBuilder(Mockable::class) |
80 | - ->setConstructorArgs([23, 42]) |
|
81 | - ->getMock(); |
|
80 | + ->setConstructorArgs([23, 42]) |
|
81 | + ->getMock(); |
|
82 | 82 | |
83 | 83 | $this->assertEquals([23, 42], $mock->constructorArgs); |
84 | 84 | } |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | public function testOriginalConstructorCanBeDisabled(): void |
87 | 87 | { |
88 | 88 | $mock = $this->getMockBuilder(Mockable::class) |
89 | - ->disableOriginalConstructor() |
|
90 | - ->getMock(); |
|
89 | + ->disableOriginalConstructor() |
|
90 | + ->getMock(); |
|
91 | 91 | |
92 | 92 | $this->assertNull($mock->constructorArgs); |
93 | 93 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | public function testByDefaultOriginalCloneIsPreserved(): void |
96 | 96 | { |
97 | 97 | $mock = $this->getMockBuilder(Mockable::class) |
98 | - ->getMock(); |
|
98 | + ->getMock(); |
|
99 | 99 | |
100 | 100 | $cloned = clone $mock; |
101 | 101 | |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | public function testOriginalCloneCanBeDisabled(): void |
106 | 106 | { |
107 | 107 | $mock = $this->getMockBuilder(Mockable::class) |
108 | - ->disableOriginalClone() |
|
109 | - ->getMock(); |
|
108 | + ->disableOriginalClone() |
|
109 | + ->getMock(); |
|
110 | 110 | |
111 | 111 | $mock->cloned = false; |
112 | 112 | $cloned = clone $mock; |
@@ -117,12 +117,12 @@ discard block |
||
117 | 117 | public function testProvidesAFluentInterface(): void |
118 | 118 | { |
119 | 119 | $spec = $this->getMockBuilder(Mockable::class) |
120 | - ->setMethods(['mockableMethod']) |
|
121 | - ->setConstructorArgs([]) |
|
122 | - ->setMockClassName('DummyClassName') |
|
123 | - ->disableOriginalConstructor() |
|
124 | - ->disableOriginalClone() |
|
125 | - ->disableAutoload(); |
|
120 | + ->setMethods(['mockableMethod']) |
|
121 | + ->setConstructorArgs([]) |
|
122 | + ->setMockClassName('DummyClassName') |
|
123 | + ->disableOriginalConstructor() |
|
124 | + ->disableOriginalClone() |
|
125 | + ->disableAutoload(); |
|
126 | 126 | |
127 | 127 | $this->assertInstanceOf(MockBuilder::class, $spec); |
128 | 128 | } |
@@ -17,15 +17,15 @@ discard block |
||
17 | 17 | public function testIntegration(): void |
18 | 18 | { |
19 | 19 | $mock = $this->getMockBuilder(stdClass::class) |
20 | - ->setMethods(['foo']) |
|
21 | - ->getMock(); |
|
20 | + ->setMethods(['foo']) |
|
21 | + ->getMock(); |
|
22 | 22 | |
23 | 23 | $mock->expects($this->any()) |
24 | - ->method('foo') |
|
25 | - ->withConsecutive( |
|
26 | - ['bar'], |
|
27 | - [21, 42] |
|
28 | - ); |
|
24 | + ->method('foo') |
|
25 | + ->withConsecutive( |
|
26 | + ['bar'], |
|
27 | + [21, 42] |
|
28 | + ); |
|
29 | 29 | |
30 | 30 | $this->assertNull($mock->foo('bar')); |
31 | 31 | $this->assertNull($mock->foo(21, 42)); |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | public function testIntegrationWithLessAssertionsThanMethodCalls(): void |
35 | 35 | { |
36 | 36 | $mock = $this->getMockBuilder(stdClass::class) |
37 | - ->setMethods(['foo']) |
|
38 | - ->getMock(); |
|
37 | + ->setMethods(['foo']) |
|
38 | + ->getMock(); |
|
39 | 39 | |
40 | 40 | $mock->expects($this->any()) |
41 | - ->method('foo') |
|
42 | - ->withConsecutive( |
|
43 | - ['bar'] |
|
44 | - ); |
|
41 | + ->method('foo') |
|
42 | + ->withConsecutive( |
|
43 | + ['bar'] |
|
44 | + ); |
|
45 | 45 | |
46 | 46 | $this->assertNull($mock->foo('bar')); |
47 | 47 | $this->assertNull($mock->foo(21, 42)); |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | public function testIntegrationExpectingException(): void |
51 | 51 | { |
52 | 52 | $mock = $this->getMockBuilder(stdClass::class) |
53 | - ->setMethods(['foo']) |
|
54 | - ->getMock(); |
|
53 | + ->setMethods(['foo']) |
|
54 | + ->getMock(); |
|
55 | 55 | |
56 | 56 | $mock->expects($this->any()) |
57 | - ->method('foo') |
|
58 | - ->withConsecutive( |
|
59 | - ['bar'], |
|
60 | - [21, 42] |
|
61 | - ); |
|
57 | + ->method('foo') |
|
58 | + ->withConsecutive( |
|
59 | + ['bar'], |
|
60 | + [21, 42] |
|
61 | + ); |
|
62 | 62 | |
63 | 63 | $mock->foo('bar'); |
64 | 64 |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | public function testWillReturnWithOneValue(): void |
17 | 17 | { |
18 | 18 | $mock = $this->getMockBuilder(stdClass::class) |
19 | - ->setMethods(['foo']) |
|
20 | - ->getMock(); |
|
19 | + ->setMethods(['foo']) |
|
20 | + ->getMock(); |
|
21 | 21 | |
22 | 22 | $mock->expects($this->any()) |
23 | - ->method('foo') |
|
24 | - ->willReturn(1); |
|
23 | + ->method('foo') |
|
24 | + ->willReturn(1); |
|
25 | 25 | |
26 | 26 | $this->assertEquals(1, $mock->foo()); |
27 | 27 | } |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | public function testWillReturnWithMultipleValues(): void |
30 | 30 | { |
31 | 31 | $mock = $this->getMockBuilder(stdClass::class) |
32 | - ->setMethods(['foo']) |
|
33 | - ->getMock(); |
|
32 | + ->setMethods(['foo']) |
|
33 | + ->getMock(); |
|
34 | 34 | |
35 | 35 | $mock->expects($this->any()) |
36 | - ->method('foo') |
|
37 | - ->willReturn(1, 2, 3); |
|
36 | + ->method('foo') |
|
37 | + ->willReturn(1, 2, 3); |
|
38 | 38 | |
39 | 39 | $this->assertEquals(1, $mock->foo()); |
40 | 40 | $this->assertEquals(2, $mock->foo()); |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | public function testWillReturnOnConsecutiveCalls(): void |
45 | 45 | { |
46 | 46 | $mock = $this->getMockBuilder(stdClass::class) |
47 | - ->setMethods(['foo']) |
|
48 | - ->getMock(); |
|
47 | + ->setMethods(['foo']) |
|
48 | + ->getMock(); |
|
49 | 49 | |
50 | 50 | $mock->expects($this->any()) |
51 | - ->method('foo') |
|
52 | - ->willReturnOnConsecutiveCalls(1, 2, 3); |
|
51 | + ->method('foo') |
|
52 | + ->willReturnOnConsecutiveCalls(1, 2, 3); |
|
53 | 53 | |
54 | 54 | $this->assertEquals(1, $mock->foo()); |
55 | 55 | $this->assertEquals(2, $mock->foo()); |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | public function testWillReturnByReference(): void |
60 | 60 | { |
61 | 61 | $mock = $this->getMockBuilder(stdClass::class) |
62 | - ->setMethods(['foo']) |
|
63 | - ->getMock(); |
|
62 | + ->setMethods(['foo']) |
|
63 | + ->getMock(); |
|
64 | 64 | |
65 | 65 | $mock->expects($this->any()) |
66 | - ->method('foo') |
|
67 | - ->willReturnReference($value); |
|
66 | + ->method('foo') |
|
67 | + ->willReturnReference($value); |
|
68 | 68 | |
69 | 69 | $this->assertNull($mock->foo()); |
70 | 70 | $value = 'foo'; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $proxy = $this->createTestProxy(TestProxyFixture::class); |
19 | 19 | |
20 | 20 | $proxy->expects($this->once()) |
21 | - ->method('returnString'); |
|
21 | + ->method('returnString'); |
|
22 | 22 | |
23 | 23 | \assert($proxy instanceof MockObject); |
24 | 24 | \assert($proxy instanceof TestProxyFixture); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $proxy = $this->createTestProxy(TestProxyFixture::class); |
32 | 32 | |
33 | 33 | $proxy->expects($this->once()) |
34 | - ->method('returnTypedString'); |
|
34 | + ->method('returnTypedString'); |
|
35 | 35 | |
36 | 36 | \assert($proxy instanceof MockObject); |
37 | 37 | \assert($proxy instanceof TestProxyFixture); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $proxy = $this->createTestProxy(TestProxyFixture::class); |
45 | 45 | |
46 | 46 | $proxy->expects($this->once()) |
47 | - ->method('returnObject'); |
|
47 | + ->method('returnObject'); |
|
48 | 48 | |
49 | 49 | \assert($proxy instanceof MockObject); |
50 | 50 | \assert($proxy instanceof TestProxyFixture); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $proxy = $this->createTestProxy(TestProxyFixture::class); |
58 | 58 | |
59 | 59 | $proxy->expects($this->once()) |
60 | - ->method('returnTypedObject'); |
|
60 | + ->method('returnTypedObject'); |
|
61 | 61 | |
62 | 62 | \assert($proxy instanceof MockObject); |
63 | 63 | \assert($proxy instanceof TestProxyFixture); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $proxy = $this->createTestProxy(TestProxyFixture::class); |
71 | 71 | |
72 | 72 | $proxy->expects($this->once()) |
73 | - ->method('returnObjectOfFinalClass'); |
|
73 | + ->method('returnObjectOfFinalClass'); |
|
74 | 74 | |
75 | 75 | \assert($proxy instanceof MockObject); |
76 | 76 | \assert($proxy instanceof TestProxyFixture); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $proxy = $this->createTestProxy(TestProxyFixture::class); |
84 | 84 | |
85 | 85 | $proxy->expects($this->once()) |
86 | - ->method('returnTypedObjectOfFinalClass'); |
|
86 | + ->method('returnTypedObjectOfFinalClass'); |
|
87 | 87 | |
88 | 88 | \assert($proxy instanceof MockObject); |
89 | 89 | \assert($proxy instanceof TestProxyFixture); |
@@ -402,7 +402,7 @@ |
||
402 | 402 | } |
403 | 403 | |
404 | 404 | $buffer .= TestFailure::exceptionToString($t) . "\n" . |
405 | - Filter::getFilteredStacktrace($t); |
|
405 | + Filter::getFilteredStacktrace($t); |
|
406 | 406 | |
407 | 407 | $fault = $this->document->createElement( |
408 | 408 | $type, |
@@ -937,7 +937,7 @@ |
||
937 | 937 | if ($className === '') { |
938 | 938 | do { |
939 | 939 | $className = $prefix . $type . '_' . |
940 | - \substr(\md5(\mt_rand()), 0, 8); |
|
940 | + \substr(\md5(\mt_rand()), 0, 8); |
|
941 | 941 | } while (\class_exists($className, false)); |
942 | 942 | } |
943 | 943 |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | |
129 | 129 | if ($this->afterMatchBuilderId !== null) { |
130 | 130 | $builder = $invocation->getObject() |
131 | - ->__phpunit_getInvocationMocker() |
|
132 | - ->lookupId($this->afterMatchBuilderId); |
|
131 | + ->__phpunit_getInvocationMocker() |
|
132 | + ->lookupId($this->afterMatchBuilderId); |
|
133 | 133 | |
134 | 134 | if (!$builder) { |
135 | 135 | throw new RuntimeException( |
@@ -183,8 +183,8 @@ discard block |
||
183 | 183 | { |
184 | 184 | if ($this->afterMatchBuilderId !== null) { |
185 | 185 | $builder = $invocation->getObject() |
186 | - ->__phpunit_getInvocationMocker() |
|
187 | - ->lookupId($this->afterMatchBuilderId); |
|
186 | + ->__phpunit_getInvocationMocker() |
|
187 | + ->lookupId($this->afterMatchBuilderId); |
|
188 | 188 | |
189 | 189 | if (!$builder) { |
190 | 190 | throw new RuntimeException( |
@@ -47,6 +47,6 @@ |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | return 'return result of user defined callback ' . $this->callback . |
50 | - ' with the passed arguments'; |
|
50 | + ' with the passed arguments'; |
|
51 | 51 | } |
52 | 52 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function testGetName() |
16 | 16 | { |
17 | 17 | $tokenStream = new PHP_Token_Stream( |
18 | - TEST_FILES_PATH . 'classInNamespace.php' |
|
18 | + TEST_FILES_PATH . 'classInNamespace.php' |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 | foreach ($tokenStream as $token) { |