Ejemplo n.º 1
0
 public function testSetAndGetAndAddProjectCategories()
 {
     $project = new Project();
     $category = new Category();
     $project->addCategory($category);
     $categories = $project->getCategories();
     $this->assertEquals($categories->count(), 1);
     $this->assertTrue(\is_a($categories, 'Doctrine\\Common\\Collections\\ArrayCollection'), 2);
     $project->setCategories($categories);
     $this->assertEquals($project->getCategories(), $categories);
 }