/** * Prepare website for test. * * @param Website $website * @return Website */ protected function prepareWebsite(Website $website) { $id = preg_replace("@.*/(\\d+)/@", "\$1", $this->storeIndex->getStoreGrid()->getLinkUrl($website->getName())); $data = array_merge($website->getData(), ['website_id' => $id]); return $this->fixtureFactory->createByCode('website', ['data' => $data]); }
/** * Prepare website fixture. * * @param Website $website * @param int $websiteId * @return Website */ protected function prepareWebsite(Website $website, $websiteId) { $websiteData = $website->getData(); $websiteData['website_id'] = $websiteId; $website = $this->fixtureFactory->createByCode('website', ['data' => $websiteData]); return $website; }