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 a22ad1f commit a86b2a0Copy full SHA for a86b2a0
tests/Database/DatabaseEloquentModelTest.php
@@ -91,6 +91,16 @@ public function testDirtyAttributes()
91
$this->assertTrue($model->isDirty(['foo', 'bar']));
92
}
93
94
+ public function testFloatAndNullComparisonWhenDirty()
95
+ {
96
+ $model = new EloquentModelCastingStub();
97
+ $model->floatAttribute = null;
98
+ $model->syncOriginal();
99
+ $this->assertFalse($model->isDirty('floatAttribute'));
100
+ $model->forceFill(['floatAttribute' => 0.0]);
101
+ $this->assertTrue($model->isDirty('floatAttribute'));
102
+ }
103
+
104
public function testDirtyOnCastOrDateAttributes()
105
{
106
$model = new EloquentModelCastingStub;
0 commit comments