public function getEntity() { $entity = 'contact'; $fullEntity = $this->contactService->getEntity($entity); $fullEntityName = $this->contactService->getFullEntityName($entity); $this->assertInstanceOf($fullEntityName, $fullEntity); }
/** * {@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); }
/** * {@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); }
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()); }
/** * {@inheritDoc} */ public function setUp() { $this->serviceManager = Bootstrap::getServiceManager(); $this->contactService = new ContactService(); $this->contactService->setServiceLocator($this->serviceManager); }