We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 705eba0 + 71bde40 commit deccf9eCopy full SHA for deccf9e
tests/unit/Framework/MockObject/TestDoubleTestCase.php
@@ -281,6 +281,18 @@ final public function testOriginalCloneMethodCanOptionallyBeCalledWhenTestDouble
281
clone $double;
282
}
283
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
293
+ ->willReturn(true);
294
+ }
295
296
/**
297
* @psalm-template RealInstanceType of object
298
*
0 commit comments