/** * Verify that diff() goes back to null results after deleting data. */ public function testCreatingAndDeletingModel() { $model = new Models\ModelWithTraitAndBootObserver(); $model->fill(['author_id' => 1337, 'title' => 'Hello World!', 'body' => 'This is the body.', 'published' => true, 'id' => 5]); $model->save(); $diff = $model->diff(); $this->assertEquals($model->toArray(), $diff['data']); $model->delete(); $diff = $model->diff(); $this->assertNull($diff); }