Skip to content

Commit b3dddef

Browse files
Merge branch '10.5' into 11.5
2 parents 04bd064 + 2ad0441 commit b3dddef

File tree

8 files changed

+140
-140
lines changed

8 files changed

+140
-140
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ final class CreateConfiguredMockTest extends TestCase
2424
{
2525
public function testCreatesMockObjectForInterfaceOrExtendableClassWithReturnValueConfigurationForMultipleMethods(): void
2626
{
27-
$stub = $this->createConfiguredMock(
27+
$double = $this->createConfiguredMock(
2828
InterfaceWithReturnTypeDeclaration::class,
2929
[
3030
'doSomething' => true,
3131
'doSomethingElse' => 1,
3232
],
3333
);
3434

35-
$this->assertTrue($stub->doSomething());
36-
$this->assertSame(1, $stub->doSomethingElse(0));
35+
$this->assertTrue($double->doSomething());
36+
$this->assertSame(1, $double->doSomethingElse(0));
3737
}
3838
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ final class CreateConfiguredStubTest extends TestCase
2424
{
2525
public function testCreatesTestStubForInterfaceOrExtendableClassWithReturnValueConfigurationForMultipleMethods(): void
2626
{
27-
$stub = $this->createConfiguredStub(
27+
$double = $this->createConfiguredStub(
2828
InterfaceWithReturnTypeDeclaration::class,
2929
[
3030
'doSomething' => true,
3131
'doSomethingElse' => 1,
3232
],
3333
);
3434

35-
$this->assertTrue($stub->doSomething());
36-
$this->assertSame(1, $stub->doSomethingElse(0));
35+
$this->assertTrue($double->doSomething());
36+
$this->assertSame(1, $double->doSomethingElse(0));
3737
}
3838
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ final class CreatePartialMockTest extends TestCase
2626
{
2727
public function testCreatesPartialMockObjectForExtendableClass(): void
2828
{
29-
$mock = $this->createPartialMock(ExtendableClass::class, ['doSomethingElse']);
29+
$double = $this->createPartialMock(ExtendableClass::class, ['doSomethingElse']);
3030

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

33-
$this->assertTrue($mock->doSomething());
33+
$this->assertTrue($double->doSomething());
3434
}
3535

3636
public function testCannotCreatePartialMockObjectForExtendableClassWithDuplicateMethods(): void
@@ -43,10 +43,10 @@ public function testCannotCreatePartialMockObjectForExtendableClassWithDuplicate
4343

4444
public function testMethodOfPartialMockThatIsNotConfigurableCannotBeConfigured(): void
4545
{
46-
$mock = $this->createPartialMock(ExtendableClass::class, ['doSomethingElse']);
46+
$double = $this->createPartialMock(ExtendableClass::class, ['doSomethingElse']);
4747

4848
try {
49-
$mock->expects($this->once())->method('doSomething')->willReturn(true);
49+
$double->expects($this->once())->method('doSomething')->willReturn(true);
5050
} catch (MethodCannotBeConfiguredException $e) {
5151
$this->assertSame('Trying to configure method "doSomething" which cannot be configured because it does not exist, has not been specified, is final, or is static', $e->getMessage());
5252

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ final class CreateTestProxyTest extends TestCase
2727
{
2828
public function testCreatesTestProxyForExtendableClass(): void
2929
{
30-
$proxy = $this->createTestProxy(TestProxyFixture::class);
30+
$double = $this->createTestProxy(TestProxyFixture::class);
3131

32-
$proxy->expects($this->once())
32+
$double->expects($this->once())
3333
->method('returnString');
3434

35-
assert($proxy instanceof MockObject);
36-
assert($proxy instanceof TestProxyFixture);
35+
assert($double instanceof MockObject);
36+
assert($double instanceof TestProxyFixture);
3737

38-
$this->assertSame('result', $proxy->returnString());
38+
$this->assertSame('result', $double->returnString());
3939
}
4040
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ final class GetMockForAbstractClassTest extends TestCase
3030
{
3131
public function testCreatesMockObjectForAbstractClassAndAllowsConfigurationOfAbstractMethods(): void
3232
{
33-
$mock = $this->getMockForAbstractClass(AbstractClass::class);
33+
$double = $this->getMockForAbstractClass(AbstractClass::class);
3434

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

37-
$this->assertTrue($mock->doSomething());
37+
$this->assertTrue($double->doSomething());
3838
}
3939

4040
public function testCannotCreateMockObjectForAbstractClassThatDoesNotExist(): void
@@ -47,10 +47,10 @@ public function testCannotCreateMockObjectForAbstractClassThatDoesNotExist(): vo
4747

4848
public function testCreatesMockObjectForAbstractClassAndDoesNotAllowConfigurationOfConcreteMethods(): void
4949
{
50-
$mock = $this->getMockForAbstractClass(AbstractClass::class);
50+
$double = $this->getMockForAbstractClass(AbstractClass::class);
5151

5252
try {
53-
$mock->expects($this->once())->method('doSomething');
53+
$double->expects($this->once())->method('doSomething');
5454
} catch (MethodCannotBeConfiguredException $e) {
5555
$this->assertSame('Trying to configure method "doSomething" which cannot be configured because it does not exist, has not been specified, is final, or is static', $e->getMessage());
5656

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ final class GetMockForTraitTest extends TestCase
2727
{
2828
public function testCreatesMockObjectForTraitAndAllowsConfigurationOfAbstractMethods(): void
2929
{
30-
$mock = $this->getMockForTrait(TraitWithConcreteAndAbstractMethod::class);
30+
$double = $this->getMockForTrait(TraitWithConcreteAndAbstractMethod::class);
3131

32-
$mock->method('abstractMethod')->willReturn(true);
32+
$double->method('abstractMethod')->willReturn(true);
3333

34-
$this->assertTrue($mock->concreteMethod());
34+
$this->assertTrue($double->concreteMethod());
3535
}
3636

3737
public function testCannotCreateMockObjectForTraitThatDoesNotExist(): void

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ final class GetMockFromWsdlTest extends TestCase
2828
#[TestDox('Creates mock object from WSDL file')]
2929
public function testCreatesMockObjectFromWsdlFileWithNonNamespacedClassName(): void
3030
{
31-
$mock = $this->getMockFromWsdl(TEST_FILES_PATH . 'GoogleSearch.wsdl');
31+
$double = $this->getMockFromWsdl(TEST_FILES_PATH . 'GoogleSearch.wsdl');
3232

3333
$this->assertStringStartsWith(
3434
'MockObject_GoogleSearch_',
35-
$mock::class,
35+
$double::class,
3636
);
3737
}
3838
}

0 commit comments

Comments
 (0)