File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
tests/unit/Framework/MockObject/Creation Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 9
9
*/
10
10
namespace PHPUnit \Framework \MockObject ;
11
11
12
- use PHPUnit \TestFixture \MockObject \ClassCallingMethodInConstructor ;
13
12
use function assert ;
14
13
use function class_exists ;
15
14
use function interface_exists ;
28
27
use PHPUnit \Framework \MockObject \Generator \NameAlreadyInUseException ;
29
28
use PHPUnit \Framework \TestCase ;
30
29
use PHPUnit \TestFixture \MockObject \AbstractClass ;
30
+ use PHPUnit \TestFixture \MockObject \ClassCallingMethodInConstructor ;
31
31
use PHPUnit \TestFixture \MockObject \ExtendableClass ;
32
32
use PHPUnit \TestFixture \MockObject \InterfaceWithReturnTypeDeclaration ;
33
33
use PHPUnit \TestFixture \MockObject \TraitWithConcreteAndAbstractMethod ;
@@ -170,11 +170,12 @@ public function testCreatesMockObjectForUnknownType(): void
170
170
#[TestDox('onlyMethods() mocked methods can be called within the original constructor ' )]
171
171
public function testOnlyMethodCalledInConstructorWorks (): void
172
172
{
173
- $ testClassMock = $ this ->getMockBuilder (ClassCallingMethodInConstructor::class)
173
+ $ double = $ this ->getMockBuilder (ClassCallingMethodInConstructor::class)
174
174
->onlyMethods (['reset ' ])
175
175
->getMock ();
176
176
177
- $ testClassMock ->expects ($ this ::once ())->method ('reset ' );
178
- $ testClassMock ->second ();
177
+ $ double ->expects ($ this ->once ())->method ('reset ' );
178
+
179
+ $ double ->second ();
179
180
}
180
181
}
You can’t perform that action at this time.
0 commit comments