/** * @param string $email * @param string $name * @param string $password * @param string $imageId * @return \Ag\Login\Domain\Model\AccountDescriptor */ protected function createAccountHelper($email, $name, $password, $imageId) { $account = $this->accountFactory->create($email, $name, $password, $imageId); $this->accountRepository->add($account); $this->persistenceManager->persistAll(); return $account->getDescriptor(); }
/** * @expectedException \InvalidArgumentException * @test */ public function invalidEmailThrowsException() { $this->factory->create('info'); }