From 26a779ade0642d7b32ac61f1121c6e71f0a82879 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Tue, 5 Nov 2024 21:30:20 -0500 Subject: [PATCH] Fix failing tests --- app/composer.lock | 4 ++-- app/src/Controller/User/RegisterUserAction.php | 2 +- app/tests/Controller/User/RegisterUserActionTest.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/composer.lock b/app/composer.lock index 71bc412..c9249a7 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -6242,12 +6242,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "ext-pdo": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/app/src/Controller/User/RegisterUserAction.php b/app/src/Controller/User/RegisterUserAction.php index 5434669..b408c38 100644 --- a/app/src/Controller/User/RegisterUserAction.php +++ b/app/src/Controller/User/RegisterUserAction.php @@ -24,7 +24,7 @@ class RegisterUserAction extends Controller 'password' => $requestData['password'], ]); - $success = $this->userRepository->save($user); + $success = $this->userRepository->create($user); if ($success) { return $this->render('user/success.twig'); diff --git a/app/tests/Controller/User/RegisterUserActionTest.php b/app/tests/Controller/User/RegisterUserActionTest.php index aacada1..e011d6b 100644 --- a/app/tests/Controller/User/RegisterUserActionTest.php +++ b/app/tests/Controller/User/RegisterUserActionTest.php @@ -60,7 +60,7 @@ class RegisterUserActionTest extends TestCase /** @var \DI\Container */ $container = $app->getContainer(); $userRepository = $this->prophesize(UserRepositoryInterface::class); - $userRepository->save($user)->willReturn(true); + $userRepository->create($user)->willReturn(true); $container->set( UserRepositoryInterface::class, $userRepository->reveal() @@ -81,7 +81,7 @@ class RegisterUserActionTest extends TestCase $container = $app->getContainer(); $userRepository = $this->prophesize(UserRepositoryInterface::class); - $userRepository->save($user)->willReturn(false); + $userRepository->create($user)->willReturn(false); $container->set( UserRepositoryInterface::class, $userRepository->reveal() @@ -118,7 +118,7 @@ class RegisterUserActionTest extends TestCase $container = $app->getContainer(); $userRepository = $this->prophesize(UserRepositoryInterface::class); - $userRepository->save($user)->willReturn(true); + $userRepository->create($user)->willReturn(true); $container->set( UserRepositoryInterface::class,