Example #1
0
 public function testFavorites()
 {
     $this->assertEquals(new ArrayCollection(), $this->user->getFavorites(), 'A new user has no favorite');
     $site = new Site();
     $this->user->addFavorite($site);
     $this->assertContains($site, $this->user->getFavorites());
     $this->assertTrue($this->user->isFavorite($site));
 }