public function sendInstitutionUserLoginCredentials(InstitutionUser $user, $password)
 {
     $messageBody = $this->twig->render('InstitutionBundle:Email:loginInformation.html.twig', array('institutionName' => $user->getInstitution()->getName(), 'firstName' => $user->getFirstName(), 'email' => $user->getEmail(), 'password' => $password));
     // send email to newly created chromedia accounts|institution user
     $message = \Swift_Message::newInstance()->setSubject('Institution User Invitation for Health Care Abroad')->setFrom('*****@*****.**')->setTo($user->getEmail())->setBody($messageBody);
     return $this->mailer->send($message);
 }
 /**
  * @depends testCreate
  * @param InstitutionUser $user
  */
 public function testFindEmailandPassword(InstitutionUser $user)
 {
     $email = $user->getEmail();
     $retrievedUser = $this->service->findByEmailAndPassword($email, $this->commonPassword);
     $this->assertNotNull($retrievedUser);
     $this->assertEquals($user->getEmail(), $user->getEmail());
     $this->assertEquals($user->getPassword(), $user->getPassword());
     // test for an admin user email
     $retrievedUser = $this->service->findByEmailAndPassword('*****@*****.**', $this->commonPassword);
     $this->assertNull($retrievedUser);
     // this should be null since retrieved user is not InstitutionUser
 }