Fix failing tests
This commit is contained in:
parent
33e04ead47
commit
26a779ade0
4
app/composer.lock
generated
4
app/composer.lock
generated
@ -6242,12 +6242,12 @@
|
|||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"ext-pdo": "*"
|
"ext-pdo": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ class RegisterUserAction extends Controller
|
|||||||
'password' => $requestData['password'],
|
'password' => $requestData['password'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$success = $this->userRepository->save($user);
|
$success = $this->userRepository->create($user);
|
||||||
|
|
||||||
if ($success) {
|
if ($success) {
|
||||||
return $this->render('user/success.twig');
|
return $this->render('user/success.twig');
|
||||||
|
@ -60,7 +60,7 @@ class RegisterUserActionTest extends TestCase
|
|||||||
/** @var \DI\Container */
|
/** @var \DI\Container */
|
||||||
$container = $app->getContainer();
|
$container = $app->getContainer();
|
||||||
$userRepository = $this->prophesize(UserRepositoryInterface::class);
|
$userRepository = $this->prophesize(UserRepositoryInterface::class);
|
||||||
$userRepository->save($user)->willReturn(true);
|
$userRepository->create($user)->willReturn(true);
|
||||||
$container->set(
|
$container->set(
|
||||||
UserRepositoryInterface::class,
|
UserRepositoryInterface::class,
|
||||||
$userRepository->reveal()
|
$userRepository->reveal()
|
||||||
@ -81,7 +81,7 @@ class RegisterUserActionTest extends TestCase
|
|||||||
$container = $app->getContainer();
|
$container = $app->getContainer();
|
||||||
|
|
||||||
$userRepository = $this->prophesize(UserRepositoryInterface::class);
|
$userRepository = $this->prophesize(UserRepositoryInterface::class);
|
||||||
$userRepository->save($user)->willReturn(false);
|
$userRepository->create($user)->willReturn(false);
|
||||||
$container->set(
|
$container->set(
|
||||||
UserRepositoryInterface::class,
|
UserRepositoryInterface::class,
|
||||||
$userRepository->reveal()
|
$userRepository->reveal()
|
||||||
@ -118,7 +118,7 @@ class RegisterUserActionTest extends TestCase
|
|||||||
$container = $app->getContainer();
|
$container = $app->getContainer();
|
||||||
|
|
||||||
$userRepository = $this->prophesize(UserRepositoryInterface::class);
|
$userRepository = $this->prophesize(UserRepositoryInterface::class);
|
||||||
$userRepository->save($user)->willReturn(true);
|
$userRepository->create($user)->willReturn(true);
|
||||||
|
|
||||||
$container->set(
|
$container->set(
|
||||||
UserRepositoryInterface::class,
|
UserRepositoryInterface::class,
|
||||||
|
Loading…
Reference in New Issue
Block a user