/** * Test getter and setter of point property. * * @covers AppBundle\Entity\Vote::setPoint() * @covers AppBundle\Entity\Vote::getPoint() */ public function testPoint() { $expected = 3; $this->vote->setPoint($expected); $this->assertEquals($expected, $this->vote->getPoint()); }
/** * Initialize Vote with required data. * * @param Vote $vote * @param User $user * @param Site $site * @param Annuaire $annuaire * @param $tracker * @param $point * * @return Vote */ public function initVote(Vote $vote, User $user, Site $site, Annuaire $annuaire, $tracker, $point) { if ($site->getAnnuaires()->contains($annuaire)) { $vote->setUser($user); $vote->setSite($site); $vote->setAnnuaire($annuaire); $vote->setTracker($tracker); $vote->setPoint($point); } else { //@todo Générer une exception ! } return $vote; }