public function testGetters() { $entityInstance = new UpdateEntity(); $this->assertNull($entityInstance->getEntity()); $testEntity = 'test'; $entityInstance->setEntity($testEntity); $this->assertSame($testEntity, $entityInstance->getEntity()); }
/** * @param string $entityClass */ protected function addPostponeJob($entityClass) { $update = $this->registry->getRepository('OroSearchBundle:UpdateEntity')->find($entityClass); if (!$update) { $em = $this->registry->getManager(); $update = new UpdateEntity(); $update->setEntity($entityClass); $em->persist($update); $em->flush($update); } }