Skip to content

Commit

Permalink
Closes #5314
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 25, 2024
1 parent 73403d8 commit 0a92c3a
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/Framework/MockObject/MockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.
*
Expand Down

0 comments on commit 0a92c3a

Please sign in to comment.