Skip to content

Commit

Permalink
Closes #5250
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 25, 2024
1 parent 6fc9ed3 commit 1bc5624
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
25 changes: 0 additions & 25 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1479,31 +1479,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
41 changes: 0 additions & 41 deletions tests/unit/Framework/MockObject/Creation/GetObjectForTraitTest.php

This file was deleted.

0 comments on commit 1bc5624

Please sign in to comment.