From 1c0109ba2f818468d5806ec067844a41b5f777d5 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Fri, 27 Dec 2024 03:16:01 +0000 Subject: [PATCH] Fix the output of the query mock to actually get a user in the test case. --- app/tests/Domain/Repository/UserRepositoryTest.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/tests/Domain/Repository/UserRepositoryTest.php b/app/tests/Domain/Repository/UserRepositoryTest.php index 91e68f2..f197f19 100644 --- a/app/tests/Domain/Repository/UserRepositoryTest.php +++ b/app/tests/Domain/Repository/UserRepositoryTest.php @@ -62,12 +62,14 @@ class UserRepositoryTest extends TestCase $databaseHandler ->query(Argument::type('string'), Argument::type('array')) ->willReturn([ - 'id' => 1, - 'name' => 'Dave Test', - 'email' => 'dave.test@email', - 'password' => $hashedPassword, - 'created_at' => '2024-11-17T00:00:00', - 'updated_at' => '2024-11-17T00:00:00' + [ + 'id' => 1, + 'name' => 'Dave Test', + 'email' => 'dave.test@email', + 'password' => $hashedPassword, + 'created_at' => '2024-11-17T00:00:00', + 'updated_at' => '2024-11-17T00:00:00' + ] ], []); $userRepository = new UserRepository(