Skip to content

Commit

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

/**
* Creates an object that uses the specified trait.
*
* @param trait-string $traitName
* @param array<mixed> $arguments
*
* @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 d2a8269

Please sign in to comment.