From 79e65fcaec1448e6984612b8170dfa90929a17ac Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 7 Feb 2024 15:19:25 +0100 Subject: [PATCH] Closes #5314 --- src/Framework/MockObject/MockBuilder.php | 36 ------------------------ 1 file changed, 36 deletions(-) diff --git a/src/Framework/MockObject/MockBuilder.php b/src/Framework/MockObject/MockBuilder.php index e51ae8c62a6..f96e248e58b 100644 --- a/src/Framework/MockObject/MockBuilder.php +++ b/src/Framework/MockObject/MockBuilder.php @@ -123,42 +123,6 @@ public function getMock(): MockObject return $object; } - /** - * Creates a mock object for an abstract class using a fluent interface. - * - * @throws Exception - * @throws ReflectionException - * @throws RuntimeException - * - * @return MockedType&MockObject - * - * @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 without replacement.', - ); - - $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. *