From 997d545e614fefb9924aa0e0cc2e31157672c633 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Thu, 17 Jan 2019 20:48:39 +0100 Subject: [PATCH] Bugfixes --- src/Model/Route/CreateResponse.php | 2 +- tests/Message/BatchMessageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Route/CreateResponse.php b/src/Model/Route/CreateResponse.php index 7b7c1f0..e0e0d0b 100644 --- a/src/Model/Route/CreateResponse.php +++ b/src/Model/Route/CreateResponse.php @@ -25,7 +25,7 @@ final class CreateResponse implements ApiResponse { $model = new self(); $model->message = $data['message'] ?? null; - $model->route = isset($data['id']) ? Route::create($data) : null; + $model->route = isset($data['route']) ? Route::create($data['route']) : null; return $model; } diff --git a/tests/Message/BatchMessageTest.php b/tests/Message/BatchMessageTest.php index 5923205..487e1c8 100644 --- a/tests/Message/BatchMessageTest.php +++ b/tests/Message/BatchMessageTest.php @@ -32,7 +32,7 @@ class BatchMessageTest extends MailgunTestCase ->setMethods(['send', 'sendMime', 'show']) ->getMock(); $messageApi->method('send') - ->willReturn(SendResponse::create(['id' => 4711, 'message' => 'Message sent'])); + ->willReturn(SendResponse::create(['id' => '4711', 'message' => 'Message sent'])); $this->batchMessage = $messageApi->getBatchMessage('example.com'); }