From ffab454314d36462d6bba1a1f802868830f02690 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 30 Oct 2016 20:59:54 +0000 Subject: [PATCH] Fix tests --- .../Commands/Incident/ReportIncidentCommandHandler.php | 4 ++-- .../Commands/Incident/UpdateIncidentCommandHandler.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php index 3a512f70..e951da4b 100644 --- a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php @@ -76,7 +76,7 @@ class ReportIncidentCommandHandler } // The incident occurred at a different time. - if ($occurredAt = $command->occurredAt) { + if ($occurredAt = $command->occurred_at) { if ($date = $this->dates->create('Y-m-d H:i', $occurredAt)) { $incident->fill(['occurred_at' => $date]); } else { @@ -129,7 +129,7 @@ class ReportIncidentCommandHandler 'visible' => $command->visible, 'notify' => $command->notify, 'stickied' => $command->stickied, - 'occurredAt' => $command->occurredAt, + 'occurred_at' => $command->occurred_at, 'component' => Component::find($command->component_id) ?: null, 'component_status' => $command->component_status, ], diff --git a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php index 64117958..140708a3 100644 --- a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php @@ -65,7 +65,7 @@ class UpdateIncidentCommandHandler $incident->fill($this->filter($command)); // The incident occurred at a different time. - if ($occurredAt = $command->occurredAt) { + if ($occurredAt = $command->occurred_at) { if ($date = $this->dates->create('Y-m-d H:i', $occurredAt)) { $incident->fill(['occurred_at' => $date]); } else { @@ -141,7 +141,7 @@ class UpdateIncidentCommandHandler 'visible' => $command->visible, 'notify' => $command->notify, 'stickied' => $command->stickied, - 'occurredAt' => $command->occurredAt, + 'occurred_at' => $command->occurred_at, 'component' => Component::find($command->component_id) ?: null, 'component_status' => $command->component_status, ],