", "json": "" }, "id": "bulk_validations_sandbox_mailgun_org", "quantity": 207, "records_processed": 208, "status": "uploaded", "summary": { "result": { "deliverable": 181854, "do_not_send": 5647, "undeliverable": 12116, "catch_all" : 2345, "unknown": 5613 }, "risk": { "high": 17763, "low": 142547, "medium": 41652, "unknown": 5613 } } } JSON; $model = Job::create(json_decode($json, true)); $this->assertEquals('2019-02-23 21:30:03', $model->getCreatedAt()->format('Y-m-d H:i:s')); $this->assertInstanceOf(JobDownloadUrl::class, $model->getDownloadUrl()); $this->assertEquals('bulk_validations_sandbox_mailgun_org', $model->getId()); $this->assertEquals(207, $model->getQuantity()); $this->assertEquals(208, $model->getRecordsProcessed()); $this->assertEquals('uploaded', $model->getStatus()); $this->assertInstanceOf(Summary::class, $model->getSummary()); } }