コード例 #1
0
 function it_should_remote_user(UserRepository $userRepository, EventDispatcherInterface $eventDispatcher, User $user, DeleteAccountAction $action)
 {
     $action->getUser()->willReturn($user);
     $userRepository->remove($user)->shouldBeCalled();
     $this->execute($action);
 }
コード例 #2
0
 public function execute(DeleteAccountAction $action)
 {
     $user = $action->getUser();
     $this->userRepository->remove($user);
 }