diff --git a/src/Framework/MockObject/MockBuilder.php b/src/Framework/MockObject/MockBuilder.php index 7216970fcff..0cfc6922c40 100644 --- a/src/Framework/MockObject/MockBuilder.php +++ b/src/Framework/MockObject/MockBuilder.php @@ -118,42 +118,6 @@ public function getMock(): MockObject return $object; } - /** - * Creates a mock object for an abstract class using a fluent interface. - * - * @psalm-return MockObject&MockedType - * - * @throws \PHPUnit\Framework\Exception - * @throws ReflectionException - * @throws RuntimeException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5305 - */ - public function getMockForAbstractClass(): MockObject - { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - $this->testCase->valueObjectForEvents(), - 'MockBuilder::getMockForAbstractClass() is deprecated and will be removed in PHPUnit 12. No replacement is/will be provided.', - ); - - $object = $this->generator->mockObjectForAbstractClass( - $this->type, - $this->constructorArgs, - $this->mockClassName ?? '', - $this->originalConstructor, - $this->originalClone, - $this->autoload, - $this->methods, - $this->cloneArguments, - ); - - assert($object instanceof MockObject); - - $this->testCase->registerMockObject($object); - - return $object; - } - /** * Creates a mock object for a trait using a fluent interface. *