@@ -80,34 +80,34 @@ public function testCannotCreateMockObjectForExtendableClassAddingMethodsToItTha
80
80
#[TestDox('getMockForAbstractClass() can be used to create a mock object for an abstract class ' )]
81
81
public function testCreatesMockObjectForAbstractClassAndAllowsConfigurationOfAbstractMethods (): void
82
82
{
83
- $ mock = $ this ->getMockBuilder (AbstractClass::class)
83
+ $ double = $ this ->getMockBuilder (AbstractClass::class)
84
84
->getMockForAbstractClass ();
85
85
86
- $ mock ->expects ($ this ->once ())->method ('doSomethingElse ' )->willReturn (true );
86
+ $ double ->expects ($ this ->once ())->method ('doSomethingElse ' )->willReturn (true );
87
87
88
- $ this ->assertTrue ($ mock ->doSomething ());
88
+ $ this ->assertTrue ($ double ->doSomething ());
89
89
}
90
90
91
91
#[TestDox('getMockForTrait() can be used to create a mock object for a trait ' )]
92
92
public function testCreatesMockObjectForTraitAndAllowsConfigurationOfMethods (): void
93
93
{
94
- $ mock = $ this ->getMockBuilder (TraitWithConcreteAndAbstractMethod::class)
94
+ $ double = $ this ->getMockBuilder (TraitWithConcreteAndAbstractMethod::class)
95
95
->getMockForTrait ();
96
96
97
- $ mock ->method ('abstractMethod ' )->willReturn (true );
97
+ $ double ->method ('abstractMethod ' )->willReturn (true );
98
98
99
- $ this ->assertTrue ($ mock ->concreteMethod ());
99
+ $ this ->assertTrue ($ double ->concreteMethod ());
100
100
}
101
101
102
102
#[TestDox('onlyMethods() can be used to configure which methods should be doubled ' )]
103
103
public function testCreatesPartialMockObjectForExtendableClass (): void
104
104
{
105
- $ mock = $ this ->getMockBuilder (ExtendableClass::class)
105
+ $ double = $ this ->getMockBuilder (ExtendableClass::class)
106
106
->onlyMethods (['doSomethingElse ' ])
107
107
->getMock ();
108
108
109
- $ mock ->expects ($ this ->once ())->method ('doSomethingElse ' )->willReturn (true );
109
+ $ double ->expects ($ this ->once ())->method ('doSomethingElse ' )->willReturn (true );
110
110
111
- $ this ->assertTrue ($ mock ->doSomething ());
111
+ $ this ->assertTrue ($ double ->doSomething ());
112
112
}
113
113
}
0 commit comments