Beispiel #1
0
 public function testOwner()
 {
     $this->assertNull($this->review->getOwner());
     $user = new User();
     $this->review->setOwner($user);
     $this->assertEquals($user, $this->review->getOwner());
 }
Beispiel #2
0
 /**
  * Create a new review
  *
  * @param int $i
  * @param User $owner
  * @param Site $site
  * @return Review
  */
 protected function createReview($i, User $owner, Site $site)
 {
     $review = new Review();
     $review->setOwner($owner);
     $review->setSite($site);
     $review->setStatus('ok');
     $review->setTranslatableLocale('fr');
     $review->setText('test review number ' . $i);
     $review->setScore(rand(1, 10));
     return $review;
 }