Skip to content

Commit

Permalink
Add missing static declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Oct 19, 2020
1 parent 20c6850 commit 53e1c2c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-9.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes of the PHPUnit 9.4 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.

## [9.4.2] - 2020-MM-DD

### Changed

* `PHPUnit\Framework\Assert::assertObjectEquals()` is now `static`

## [9.4.1] - 2020-10-11

### Fixed
Expand All @@ -20,5 +26,6 @@ All notable changes of the PHPUnit 9.4 release series are documented in this fil

* The PHPUnit XML configuration generator (that is invoked using the `--generate-configuration` CLI option) now asks for a cache directory (default: `.phpunit.cache`)

[9.4.2]: https://github.com/sebastianbergmann/phpunit/compare/9.4.1...9.4
[9.4.1]: https://github.com/sebastianbergmann/phpunit/compare/9.4.0...9.4.1
[9.4.0]: https://github.com/sebastianbergmann/phpunit/compare/9.3.11...9.4.0
24 changes: 12 additions & 12 deletions src/Framework/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@ public static function assertNotEqualsWithDelta($expected, $actual, float $delta
static::assertThat($actual, $constraint, $message);
}

/**
* @throws ExpectationFailedException
*/
public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void
{
static::assertThat(
$actual,
static::objectEquals($expected, $method),
$message
);
}

/**
* Asserts that a variable is empty.
*
Expand Down Expand Up @@ -2783,18 +2795,6 @@ public static function resetCount(): void
self::$count = 0;
}

/**
* @throws ExpectationFailedException
*/
public function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void
{
static::assertThat(
$actual,
static::objectEquals($expected, $method),
$message
);
}

private static function detectLocationHint(string $message): ?array
{
$hint = null;
Expand Down

0 comments on commit 53e1c2c

Please sign in to comment.