Skip to content

Commit 2f8ac09

Browse files
Merge branch '10.5' into 11.1
2 parents cbba7be + 8086c07 commit 2f8ac09

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public function testCreatesMockObjectForIntersectionOfInterfaces(): void
3535
$this->assertInstanceOf(AnInterface::class, $double);
3636
$this->assertInstanceOf(AnotherInterface::class, $double);
3737
$this->assertInstanceOf(Stub::class, $double);
38+
39+
$double->method('doSomething')->willReturn(true);
40+
$double->method('doSomethingElse')->willReturn(true);
41+
42+
$this->assertTrue($double->doSomething());
43+
$this->assertTrue($double->doSomethingElse());
3844
}
3945

4046
public function testReturnValueGenerationIsEnabledByDefault(): void

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public function testCreatesTestStubForIntersectionOfInterfaces(): void
3535
$this->assertInstanceOf(AnInterface::class, $double);
3636
$this->assertInstanceOf(AnotherInterface::class, $double);
3737
$this->assertInstanceOf(Stub::class, $double);
38+
39+
$double->method('doSomething')->willReturn(true);
40+
$double->method('doSomethingElse')->willReturn(true);
41+
42+
$this->assertTrue($double->doSomething());
43+
$this->assertTrue($double->doSomethingElse());
3844
}
3945

4046
public function testReturnValueGenerationIsEnabledByDefault(): void

0 commit comments

Comments
 (0)