/** * Get Test Page Data for Page Repo Mocks * * @param integer $pageId PageID * @param integer $pageName PageName * @param integer $revisionId RevisionId * @param string $pageType PageType * @param boolean $useStaged Use staged revision instead of published * @param string $siteLayoutOverride Layout Override * * @return array */ protected function getPageData($pageId, $pageName, $revisionId, $pageType = 'n', $useStaged = false, $siteLayoutOverride = null) { $country = new Country(); $country->setCountryName('United States'); $country->setIso2('US'); $country->setIso3('USA'); $language = new Language(); $language->setLanguageId(1); $language->setIso6391('en'); $language->setIso6392b('eng'); $language->setIso6392t('eng'); $domain = new Domain(); $domain->setDomainId(1); $domain->setDomainName('reliv.com'); $site = new Site(); $site->setSiteId(1); $site->setCountry($country); $site->setLanguage($language); $site->setLoginPage('login'); $site->setNotFoundPage('not-found'); $site->setDomain($domain); $revision = new Revision(); $revision->setRevisionId($revisionId); $revision->setAuthor('Westin Shafer'); $revision->setCreatedDate(new \DateTime()); $revision->setPublishedDate(new \DateTime()); $page = new Page(); $page->setSite($site); $page->setName($pageName); $page->setPageId($pageId); $page->setPageType($pageType); $page->addRevision($revision); $page->setPublishedRevision($revision); if ($useStaged) { $page->setStagedRevision($revision); } $page->setPageId(22); $page->setSiteLayoutOverride($siteLayoutOverride); return $page; }