'dave@slovocast.com', 'name' => 'Dave SH', 'password' => 'hashed_password' ]); } public function testSuccessfulRegistration(): void { $user = $this->getUser(); $prophecy = $this->getProphet() ->prophesize(UserRepositoryInterface::class); $prophecy->save($user)->willReturn(true); $app = $this->getAppInstance(); /** @var \DI\Container */ $container = $app->getContainer(); $container->set(UserRepositoryInterface::class, $prophecy->reveal()); $request = $this->createRequest('POST', '/users/register')->withParsedBody([ 'email' => 'dave@slovocast.com', 'name' => 'Dave SH', 'password' => 'hashed_password', 'checked_password' => 'hashed_password' ]); $response = $app->handle($request); $this->assertEquals(200, $response->getStatusCode()); } public function testFailingRegistration(): void { } }