Fix the output of the query mock to actually get a user in the test case.

This commit is contained in:
Dave Smith-Hayes 2024-12-27 03:16:01 +00:00
parent b88d99196d
commit 1c0109ba2f

View File

@ -62,12 +62,14 @@ class UserRepositoryTest extends TestCase
$databaseHandler $databaseHandler
->query(Argument::type('string'), Argument::type('array')) ->query(Argument::type('string'), Argument::type('array'))
->willReturn([ ->willReturn([
'id' => 1, [
'name' => 'Dave Test', 'id' => 1,
'email' => 'dave.test@email', 'name' => 'Dave Test',
'password' => $hashedPassword, 'email' => 'dave.test@email',
'created_at' => '2024-11-17T00:00:00', 'password' => $hashedPassword,
'updated_at' => '2024-11-17T00:00:00' 'created_at' => '2024-11-17T00:00:00',
'updated_at' => '2024-11-17T00:00:00'
]
], []); ], []);
$userRepository = new UserRepository( $userRepository = new UserRepository(