Skip to content

Commit

Permalink
Strict check for expected value in 'assertPromiseFulfills'
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrig committed Jan 14, 2021
1 parent 6af401c commit 73b946d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- **BREAKING**: Strict check for expected value in `assertPromiseFulfills`.

## [4.0.0] - 2020-12-10

Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/AssertsPromises.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function assertPromiseFulfills($promise, $expectedValue = null): void
}

if (! is_null($expectedValue)) {
$this->assertEquals(
$this->assertSame(
$expectedValue,
$result,
'Failed asserting that promise fulfills with a specified value.'
Expand Down
2 changes: 1 addition & 1 deletion tests/AssertsPromisesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function test_assertPromiseFulfills_fails_on_unexpected_result()
} catch (Exception $exception) {
$this->assertEquals(
"Failed asserting that promise fulfills with a specified value.\n" .
"Failed asserting that 4 matches expected 5.",
"Failed asserting that 4 is identical to 5.",
$exception->getMessage()
);
return;
Expand Down

0 comments on commit 73b946d

Please sign in to comment.