/** * {@inheritdoc} */ public function add(User $user) { $this->users[$user->id()->id()] = $user; }
/** * @param UserId $userId * @param string $email * @param string $password */ public function __construct(UserId $userId, $email, $password) { parent::__construct($userId, $email, $password); $this->surrogateUserId = $userId->id(); }
/** * @test */ public function itShouldRemoveWish() { $this->deleteWishService->execute(new DeleteWishRequest($this->dummyWish->id()->id(), $this->dummyUser->id()->id())); $this->assertNull($this->wishRepository->wishOfId($this->dummyWish->id())); }
/** * {@inheritdoc} */ public function persist(User $user) { $this->users[$user->id()->id()] = $user; }