Esempio n. 1
0
$site1 = TestUtil::createSampleSite('site1');
$site2 = TestUtil::createSampleSite('site2');
$service1 = TestUtil::createSampleService('site1_service1');
$service2 = TestUtil::createSampleService('site1_service2');
$endpoint1 = TestUtil::createSampleEndpointLocation();
$downtime1 = TestUtil::createSampleDowntime();
$downtime2 = TestUtil::createSampleDowntime();
$service1->addEndpointLocationDoJoin($endpoint1);
$downtime1->addEndpointLocation($endpoint1);
$downtime2->addEndpointLocation($endpoint1);
$site1->addServiceDoJoin($service1);
$site1->addServiceDoJoin($service2);
$ngi->addSiteDoJoin($site1);
$ngi->addSiteDoJoin($site2);
$certStatusLog1 = TestUtil::createSampleCertStatusLog();
$certStatusLog2 = TestUtil::createSampleCertStatusLog();
$site2->addCertificationStatusLog($certStatusLog1);
$site2->addCertificationStatusLog($certStatusLog2);
$this->em->persist($ngi);
$this->em->persist($site1);
$this->em->persist($site2);
$this->em->persist($service1);
$this->em->persist($service2);
$this->em->persist($certStatusLog1);
$this->em->persist($certStatusLog2);
$this->em->persist($endpoint1);
$this->em->persist($downtime1);
$this->em->persist($downtime2);
// Create some roles and link to the user, role type and ngi
// roles on ngi
$ngiRole1 = TestUtil::createSampleRole($userWithRoles, $roleType1, $ngi, RoleStatus::GRANTED);