diff --git a/tests/Database/DatabaseEloquentModelTest.php b/tests/Database/DatabaseEloquentModelTest.php index a2ea89b097ba..2a1cfccf41db 100755 --- a/tests/Database/DatabaseEloquentModelTest.php +++ b/tests/Database/DatabaseEloquentModelTest.php @@ -45,6 +45,17 @@ public function testDirtyAttributes() $this->assertTrue($model->isDirty(['foo', 'bar'])); } + public function testGetOriginalShouldAlwaysReturnArray() + { + $model = new EloquentModelStub; + $this->assertEquals([], $model->getOriginal()); + + $model->fill($attrs = ['foo' => '1', 'bar' => 2, 'baz' => 3]); + $model->syncOriginal(); + + $this->assertEquals($attrs, $model->getOriginal()); + } + public function testCalculatedAttributes() { $model = new EloquentModelStub;