Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit db55f4b

Browse files
Add test case for #322
1 parent 4e83390 commit db55f4b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/GeneratorTest.php

+14
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,18 @@ public function testCanImplementInterfacesThatHaveMethodsWithReturnTypes()
190190
{
191191
$this->generator->getMock([AnInterfaceWithReturnType::class, AnInterface::class]);
192192
}
193+
194+
/**
195+
* @covers PHPUnit_Framework_MockObject_Generator::getMock
196+
*
197+
* @ticket https://github.com/sebastianbergmann/phpunit-mock-objects/issues/322
198+
*/
199+
public function testCanConfigureMethodsForDoubleOfNonExistantClass()
200+
{
201+
$className = md5(microtime());
202+
203+
$mock = $this->generator->getMock($className, ['someMethod']);
204+
205+
$this->assertInstanceOf($className, $mock);
206+
}
193207
}

0 commit comments

Comments
 (0)