persist(self::$summit); self::$em->flush(); } protected function tearDown() { self::clearTestData(); parent::tearDown(); } public function testCreateSponsoredProject(){ $company_repository = EntityManager::getRepository(Company::class); $p1 = new SponsoredProject(); $p1->setName("Kata Containers"); $p1->setIsActive(true); $sponsorship1 = new ProjectSponsorshipType(); $sponsorship1->setName("PLATINUM MEMBERS"); $description1 = <<setDescription($description1); $sponsorship1->setIsActive(true); $p1->addSponsorshipType($sponsorship1); $companies = $company_repository->findAll(); $sponsorship1->addSupportingCompany($companies[0]); $sponsorship1->addSupportingCompany($companies[1]); self::$em->persist($p1); self::$em->flush(); } }