Skip to content

Commit

Permalink
Closes #5250
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 17, 2024
1 parent 0167171 commit 538a2a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
25 changes: 0 additions & 25 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1470,31 +1470,6 @@ final protected function getMockFromWsdl(string $wsdlFile, string $originalClass
return $mockObject;
}

/**
* Creates an object that uses the specified trait.
*
* @psalm-param trait-string $traitName
*
* @throws MockObjectException
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5244
*/
final protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object
{
Event\Facade::emitter()->testTriggeredPhpunitDeprecation(
$this->valueObjectForEvents(),
'getObjectForTrait() is deprecated and will be removed in PHPUnit 12 without replacement.',
);

return (new MockGenerator)->objectForTrait(
$traitName,
$traitClassName,
$callAutoload,
$callOriginalConstructor,
$arguments,
);
}

protected function transformException(Throwable $t): Throwable
{
return $t;
Expand Down
43 changes: 0 additions & 43 deletions tests/unit/Framework/MockObject/Creation/GetObjectForTraitTest.php

This file was deleted.

0 comments on commit 538a2a4

Please sign in to comment.