Skip to content

Commit

Permalink
Closes #5064
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jan 14, 2023
1 parent bda4aed commit 91a69b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog-9.6.md
Expand Up @@ -6,6 +6,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil

### Changed

* [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()`
* [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes

[9.6.0]: https://github.com/sebastianbergmann/phpunit/compare/9.5...9.6
4 changes: 4 additions & 0 deletions src/Framework/TestCase.php
Expand Up @@ -1825,9 +1825,13 @@ protected function createTestProxy(string $originalClassName, array $constructor
* @psalm-param class-string<RealInstanceType>|string $originalClassName
*
* @psalm-return class-string<MockObject&RealInstanceType>
*
* @deprecated
*/
protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string
{
$this->addWarning('PHPUnit\Framework\TestCase::getMockClass() is deprecated and will be removed in PHPUnit 10.');

$this->recordDoubledType($originalClassName);

$mock = $this->getMockObjectGenerator()->getMock(
Expand Down

0 comments on commit 91a69b0

Please sign in to comment.