/** * Run tests to ensure the output is correct for set/getUser * * @return void */ public function testUser() { $user = $this->getMock('\\OpenSkedge\\AppBundle\\Entity\\User'); $sh = new Shift(); $sh->setUser($user); $this->assertInstanceOf('\\OpenSkedge\\AppBundle\\Entity\\User', $sh->getUser()); }
public function notifyShiftDenied(Shift $shift) { $this->dispatchMessage('OpenSkedgeBundle:Mailer:shiftdenied.txt.twig', array('shift' => $shift), $this->parameters['senderEmail'], $shift->getUser()->getEmail()); if ($shift->getPickedUpBy instanceof UserInterface) { $this->dispatchMessage('OpenSkedgeBundle:Mailer:shiftdenied_pickedup.txt.twig', array('shift' => $shift), $this->parameters['senderEmail'], $shift->getPickedUpBy()->getEmail()); } }