Skip to content

Commit 73b946d

Browse files
committed
Strict check for expected value in 'assertPromiseFulfills'
1 parent 6af401c commit 73b946d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
- **BREAKING**: Strict check for expected value in `assertPromiseFulfills`.
1012

1113
## [4.0.0] - 2020-12-10
1214

src/Concerns/AssertsPromises.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function assertPromiseFulfills($promise, $expectedValue = null): void
3838
}
3939

4040
if (! is_null($expectedValue)) {
41-
$this->assertEquals(
41+
$this->assertSame(
4242
$expectedValue,
4343
$result,
4444
'Failed asserting that promise fulfills with a specified value.'

tests/AssertsPromisesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function test_assertPromiseFulfills_fails_on_unexpected_result()
6565
} catch (Exception $exception) {
6666
$this->assertEquals(
6767
"Failed asserting that promise fulfills with a specified value.\n" .
68-
"Failed asserting that 4 matches expected 5.",
68+
"Failed asserting that 4 is identical to 5.",
6969
$exception->getMessage()
7070
);
7171
return;

0 commit comments

Comments
 (0)