Skip to content

Commit 4b83ad8

Browse files
Tweaked tests
1 parent 0a49b23 commit 4b83ad8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/Database/DatabaseEloquentModelTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,8 @@ public function testCleanWhenFloatUpdateAttribute()
153153
$original = -16.666347;
154154
$new = 20.1 - 36.766347;
155155

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);
156+
$this->assertFalse($original === $new);
157+
$this->assertSame(0, bccomp($original, $new));
162158

163159
$model = new EloquentModelStub(['castedFloat' => $original]);
164160
$model->syncOriginal();

0 commit comments

Comments
 (0)