Skip to content

Commit

Permalink
Ignore deprecated methods from code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 28, 2024
1 parent 8309713 commit 68ca073
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ final public static function atMost(int $allowedInvocations): InvokedAtMostCount
/**
* @deprecated Use <code>$double->willReturn()</code> instead of <code>$double->will($this->returnValue())</code>
* @see https://github.com/sebastianbergmann/phpunit/issues/5423
*
* @codeCoverageIgnore
*/
final public static function returnValue(mixed $value): ReturnStub
{
Expand All @@ -271,6 +273,8 @@ final public static function returnValue(mixed $value): ReturnStub
/**
* @deprecated Use <code>$double->willReturnMap()</code> instead of <code>$double->will($this->returnValueMap())</code>
* @see https://github.com/sebastianbergmann/phpunit/issues/5423
*
* @codeCoverageIgnore
*/
final public static function returnValueMap(array $valueMap): ReturnValueMapStub
{
Expand All @@ -280,6 +284,8 @@ final public static function returnValueMap(array $valueMap): ReturnValueMapStub
/**
* @deprecated Use <code>$double->willReturnArgument()</code> instead of <code>$double->will($this->returnArgument())</code>
* @see https://github.com/sebastianbergmann/phpunit/issues/5423
*
* @codeCoverageIgnore
*/
final public static function returnArgument(int $argumentIndex): ReturnArgumentStub
{
Expand All @@ -289,6 +295,8 @@ final public static function returnArgument(int $argumentIndex): ReturnArgumentS
/**
* @deprecated Use <code>$double->willReturnCallback()</code> instead of <code>$double->will($this->returnCallback())</code>
* @see https://github.com/sebastianbergmann/phpunit/issues/5423
*
* @codeCoverageIgnore
*/
final public static function returnCallback(callable $callback): ReturnCallbackStub
{
Expand All @@ -298,6 +306,8 @@ final public static function returnCallback(callable $callback): ReturnCallbackS
/**
* @deprecated Use <code>$double->willReturnSelf()</code> instead of <code>$double->will($this->returnSelf())</code>
* @see https://github.com/sebastianbergmann/phpunit/issues/5423
*
* @codeCoverageIgnore
*/
final public static function returnSelf(): ReturnSelfStub
{
Expand All @@ -313,6 +323,8 @@ final public static function throwException(Throwable $exception): ExceptionStub
* @deprecated Use <code>$double->willReturn()</code> instead of <code>$double->will($this->onConsecutiveCalls())</code>
* @see https://github.com/sebastianbergmann/phpunit/issues/5423
* @see https://github.com/sebastianbergmann/phpunit/issues/5425
*
* @codeCoverageIgnore
*/
final public static function onConsecutiveCalls(mixed ...$arguments): ConsecutiveCallsStub
{
Expand Down Expand Up @@ -619,6 +631,8 @@ final public function expectsOutput(): bool
* @internal This method is not covered by the backward compatibility promise for PHPUnit
*
* @deprecated
*
* @codeCoverageIgnore
*/
final public function registerMockObjectsFromTestArgumentsRecursively(): void
{
Expand Down Expand Up @@ -1189,6 +1203,8 @@ protected function runTest(): mixed
* @throws Exception
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5214
*
* @codeCoverageIgnore
*/
protected function iniSet(string $varName, string $newValue): void
{
Expand All @@ -1214,6 +1230,8 @@ protected function iniSet(string $varName, string $newValue): void
* @throws Exception
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5216
*
* @codeCoverageIgnore
*/
protected function setLocale(mixed ...$arguments): void
{
Expand Down

0 comments on commit 68ca073

Please sign in to comment.