We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a49b23 commit 4b83ad8Copy full SHA for 4b83ad8
tests/Database/DatabaseEloquentModelTest.php
@@ -153,12 +153,8 @@ public function testCleanWhenFloatUpdateAttribute()
153
$original = -16.666347;
154
$new = 20.1 - 36.766347;
155
156
- // PHP isn't able to compare two floats using === reliably.
157
- // See warning here:
158
- // https://www.php.net/manual/en/language.types.float.php
159
-
160
- $this->assertTrue($original !== $new);
161
- $this->assertTrue(bccomp($original, $new) === 0);
+ $this->assertFalse($original === $new);
+ $this->assertSame(0, bccomp($original, $new));
162
163
$model = new EloquentModelStub(['castedFloat' => $original]);
164
$model->syncOriginal();
0 commit comments