function it_should_remote_user(UserRepository $userRepository, EventDispatcherInterface $eventDispatcher, User $user, DeleteAccountAction $action) { $action->getUser()->willReturn($user); $userRepository->remove($user)->shouldBeCalled(); $this->execute($action); }
public function execute(DeleteAccountAction $action) { $user = $action->getUser(); $this->userRepository->remove($user); }