From 16c013a941256bd80190565290bc43b8633f8424 Mon Sep 17 00:00:00 2001
From: Vinciane <vinciane.bizet@maarch.org>
Date: Fri, 28 Dec 2018 17:41:00 +0100
Subject: [PATCH] Correction NotificationScheduleControllerTest

---
 .../app/notification/NotificationScheduleControllerTest.php     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unitTests/app/notification/NotificationScheduleControllerTest.php b/test/unitTests/app/notification/NotificationScheduleControllerTest.php
index 0f5d4e283ca..969a52d4dc1 100755
--- a/test/unitTests/app/notification/NotificationScheduleControllerTest.php
+++ b/test/unitTests/app/notification/NotificationScheduleControllerTest.php
@@ -81,7 +81,7 @@ class NotificationScheduleControllerTest extends TestCase
         $response = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
         $responseBodyFail = json_decode((string) $response->getBody());
 
-        $this->assertSame('wrong format for dom', $responseBodyFail->errors[0]);
+        $this->assertSame( 'wrong format for dom', $responseBodyFail->errors[ count($responseBodyFail->errors) - 1 ] );
 
         // CREATE
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-- 
GitLab