Ejemplo n.º 1
0
 public function getEntity()
 {
     $entity = 'contact';
     $fullEntity = $this->contactService->getEntity($entity);
     $fullEntityName = $this->contactService->getFullEntityName($entity);
     $this->assertInstanceOf($fullEntityName, $fullEntity);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     $this->serviceManager = Bootstrap::getServiceManager();
     $this->entityManager = $this->serviceManager->get('Doctrine\\ORM\\EntityManager');
     $this->programService = new ProgramService();
     $this->programService->setServiceLocator($this->serviceManager);
     $this->contactService = new ContactService();
     $this->contactService->setServiceLocator($this->serviceManager);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     $this->serviceManager = Bootstrap::getServiceManager();
     $this->entityManager = $this->serviceManager->get('doctrine.entitymanager.orm_default');
     $this->programService = new ProgramService();
     $this->programService->setServiceLocator($this->serviceManager);
     $this->contactService = new ContactService();
     $this->contactService->setServiceLocator($this->serviceManager);
 }
Ejemplo n.º 4
0
 public function testCanUploadNDA()
 {
     $call = $this->callService->setCallId(1)->getCall();
     $contact = $this->contactService->setContactId(1)->getContact();
     $file = ['name' => 'This is an uploaded file', 'type' => 'application/pdf', 'tmp_name' => __DIR__ . '/../../data/template_nda.pdf', 'error' => 0, 'size' => 145000];
     $uploadedNda = $this->callService->uploadNda($file, $contact, $call);
     $this->assertInstanceOf("Program\\Entity\\NdaObject", $uploadedNda);
     $this->assertEquals($file['size'], $uploadedNda->getNda()->getSize());
     $this->assertNotNull($uploadedNda->getObject());
 }
Ejemplo n.º 5
0
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     $this->serviceManager = Bootstrap::getServiceManager();
     $this->contactService = new ContactService();
     $this->contactService->setServiceLocator($this->serviceManager);
 }