Skip to content

Commit deccf9e

Browse files
Merge branch '10.5' into 11.2
2 parents 705eba0 + 71bde40 commit deccf9e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/unit/Framework/MockObject/TestDoubleTestCase.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,18 @@ final public function testOriginalCloneMethodCanOptionallyBeCalledWhenTestDouble
281281
clone $double;
282282
}
283283

284+
public function testMethodNameCanOnlyBeConfiguredOnce(): void
285+
{
286+
$double = $this->createTestDouble(InterfaceWithReturnTypeDeclaration::class);
287+
288+
$this->expectException(MethodNameAlreadyConfiguredException::class);
289+
290+
$double
291+
->method('doSomething')
292+
->method('doSomething')
293+
->willReturn(true);
294+
}
295+
284296
/**
285297
* @psalm-template RealInstanceType of object
286298
*

0 commit comments

Comments
 (0)