diff --git a/test/unitTests/app/contact/ContactControllerTest.php b/test/unitTests/app/contact/ContactControllerTest.php index 2de087e39bebe63a47330f67594a30c20851ba5f..77c641746430042726c0c15238fcda12442c2cb1 100755 --- a/test/unitTests/app/contact/ContactControllerTest.php +++ b/test/unitTests/app/contact/ContactControllerTest.php @@ -52,6 +52,10 @@ class ContactControllerTest extends TestCase $this->assertIsInt($responseBody['id']); self::$id = $responseBody['id']; + $GLOBALS['login'] = 'cchaplin'; + $userInfo = \User\models\UserModel::getByLogin(['login' => $GLOBALS['login'], 'select' => ['id']]); + $GLOBALS['id'] = $userInfo['id']; + $args = [ 'civility' => 'title1', 'firstname' => 'Hal', @@ -75,6 +79,10 @@ class ContactControllerTest extends TestCase $responseBody = json_decode((string)$response->getBody(), true); $this->assertSame(self::$id, $responseBody['id']); + $GLOBALS['login'] = 'superadmin'; + $userInfo = \User\models\UserModel::getByLogin(['login' => $GLOBALS['login'], 'select' => ['id']]); + $GLOBALS['id'] = $userInfo['id']; + $args2 = [ 'civility' => 'title1', 'firstname' => 'Dwight',