public function testUser() { $businessUnit = new BusinessUnit(); $user = new User(); $businessUnit->setUsers(new ArrayCollection(array($user))); $this->assertContains($user, $businessUnit->getUsers()); $businessUnit->removeUser($user); $this->assertNotContains($user, $businessUnit->getUsers()); $businessUnit->addUser($user); $this->assertContains($user, $businessUnit->getUsers()); }