Skip to content

Commit 35fe755

Browse files
Use consistent variable name
1 parent ccdbffb commit 35fe755

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/unit/Framework/MockObject/Creation/MockBuilderTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,34 +80,34 @@ public function testCannotCreateMockObjectForExtendableClassAddingMethodsToItTha
8080
#[TestDox('getMockForAbstractClass() can be used to create a mock object for an abstract class')]
8181
public function testCreatesMockObjectForAbstractClassAndAllowsConfigurationOfAbstractMethods(): void
8282
{
83-
$mock = $this->getMockBuilder(AbstractClass::class)
83+
$double = $this->getMockBuilder(AbstractClass::class)
8484
->getMockForAbstractClass();
8585

86-
$mock->expects($this->once())->method('doSomethingElse')->willReturn(true);
86+
$double->expects($this->once())->method('doSomethingElse')->willReturn(true);
8787

88-
$this->assertTrue($mock->doSomething());
88+
$this->assertTrue($double->doSomething());
8989
}
9090

9191
#[TestDox('getMockForTrait() can be used to create a mock object for a trait')]
9292
public function testCreatesMockObjectForTraitAndAllowsConfigurationOfMethods(): void
9393
{
94-
$mock = $this->getMockBuilder(TraitWithConcreteAndAbstractMethod::class)
94+
$double = $this->getMockBuilder(TraitWithConcreteAndAbstractMethod::class)
9595
->getMockForTrait();
9696

97-
$mock->method('abstractMethod')->willReturn(true);
97+
$double->method('abstractMethod')->willReturn(true);
9898

99-
$this->assertTrue($mock->concreteMethod());
99+
$this->assertTrue($double->concreteMethod());
100100
}
101101

102102
#[TestDox('onlyMethods() can be used to configure which methods should be doubled')]
103103
public function testCreatesPartialMockObjectForExtendableClass(): void
104104
{
105-
$mock = $this->getMockBuilder(ExtendableClass::class)
105+
$double = $this->getMockBuilder(ExtendableClass::class)
106106
->onlyMethods(['doSomethingElse'])
107107
->getMock();
108108

109-
$mock->expects($this->once())->method('doSomethingElse')->willReturn(true);
109+
$double->expects($this->once())->method('doSomethingElse')->willReturn(true);
110110

111-
$this->assertTrue($mock->doSomething());
111+
$this->assertTrue($double->doSomething());
112112
}
113113
}

0 commit comments

Comments
 (0)