protected function initOrganization() { $repo = $this->getApplicationServiceLocator()->get('repositories')->get('Organizations/Organization'); $name = 'Job Repository Test Organization'; $results = $repo->findByName($name); $organization = $results[0]; if (!$organization) { $organization = new Organization(); $organization->setIsDraft(false); $organization->setOrganizationName(new OrganizationName()); $organization->getOrganizationName()->setName($name); $this->dm->persist($organization); $this->dm->flush($organization); $this->dm->refresh($organization); } $this->organization = $organization; }
/** * {@inheritdoc} */ public function generateMissingForProduct(ProductInterface $product) { $this->generate($product); $this->documentManager->refresh($product); }