/** * {@inheritDoc} */ public function setUp() { $this->serviceManager = Bootstrap::getServiceManager(); $this->call = new Call(); $this->call->setId(1); $this->call->setCall('This is the call'); $program = new Program(); $program->setProgram('This is the program'); $this->call->setProgram($program); $this->authorizeService = $this->serviceManager->get('BjyAuthorize\\Service\\Authorize'); if (!$this->authorizeService->getAcl()->hasResource($this->call)) { $this->authorizeService->getAcl()->addResource($this->call); $this->authorizeService->getAcl()->allow([], $this->call, []); } /** * Add the resource on the fly */ if (!$this->authorizeService->getAcl()->hasResource(new Call())) { $this->authorizeService->getAcl()->addResource(new Call()); } $this->authorizeService->getAcl()->allow([], new Call(), []); $this->callLink = $this->serviceManager->get('viewhelpermanager')->get('calllink'); /** * Bootstrap the application to have the other information available */ $application = $this->serviceManager->get('application'); $application->bootstrap(); }
public function provider() { $programTest = new ProgramTest(); $call = new Call(); $call->setCall('TEST1'); $call->setDoaRequirement(Call::DOA_REQUIREMENT_PER_PROGRAM); $call->setProgram($programTest->provider()[0][0]); return [[$call]]; }
/** * Load the Gender * * @param ObjectManager $manager */ public function load(ObjectManager $manager) { $program = $manager->find("Program\\Entity\\Program", 1); $call = new \Program\Entity\Call\Call(); $call->setProgram($program); $call->setCall('1'); $call->setPoOpenDate(new \DateTime()); $call->setPoCloseDate(new \DateTime()); $call->setFppOpenDate(new \DateTime()); $call->setFppCloseDate(new \DateTime()); $call->setDoaRequirement(Call::DOA_REQUIREMENT_PER_PROGRAM); $manager->persist($call); $manager->flush(); }
/** * {@inheritDoc} */ public function setUp() { $this->serviceManager = Bootstrap::getServiceManager(); $this->nda = new Nda(); $this->nda->setId(1); $contact = new Contact(); $contact->setId(1234); $this->nda->setContact($contact); $program = new Program(); $program->setId(1); $program->setProgram('Program'); $call = new Call(); $call->setId(1); $call->setCall("Call"); $call->setProgram($program); $this->nda->setCall(new ArrayCollection([$call])); $this->ndaLink = $this->serviceManager->get('viewhelpermanager')->get('ndaLink'); /** * Bootstrap the application to have the other information available */ $application = $this->serviceManager->get('application'); $application->bootstrap(); }
public function testToString() { $project = new Project(); $project->setProject('12'); $call = new Call(); $call->setCall('test'); $project->setCall($call); $this->assertNotNull((string) $project); }