/** * Removes user object * * @ApiDoc( * section="User management", * description="Removes user object", * statusCodes={ * 204="Return when successful", * 404="User not found", * } * ) * * @ParamConverter("user", class="ArkonUserBundle:User") * @View(statusCode=204) * @param User $user */ public function removeUserAction(User $user) { $this->useCase->removeUser($user); }
public function testRemoveExistingUserWillProceedWithRemovingFromRepository() { $this->repositoryMock->expects($this->once())->method('findById')->will($this->returnValue($this->createExampleUser())); $this->repositoryMock->expects($this->once())->method('remove'); $this->useCase->removeUser($this->createExampleUser()); }