Esempio n. 1
0
 /**
  * Activate mock DAOs for authors, galleys and supp files
  * and return a test article.
  *
  * @return Article
  */
 private function _getTestArticle()
 {
     // Activate the mock DAOs.
     $this->_registerMockAuthorDAO();
     $this->_registerMockIssueDAO();
     $this->_registerMockJournalDAO();
     $this->_registerMockArticleGalleyDAO();
     $this->_registerMockSuppFileDAO();
     // Create a test article.
     $article = new PublishedArticle();
     $article->setId(3);
     $article->setJournalId(2);
     $article->setIssueId(2);
     $article->setSectionId(1);
     $article->setStatus(STATUS_PUBLISHED);
     $article->setTitle('Deutscher Titel', 'de_DE');
     $article->setTitle('English Title', 'en_US');
     $article->setAbstract('Deutsche Zusammenfassung', 'de_DE');
     $article->setAbstract('English Abstract', 'en_US');
     $article->setDiscipline('Sozialwissenschaften', 'de_DE');
     $article->setDiscipline('Social Sciences', 'en_US');
     $article->setSubject('Thema', 'de_DE');
     $article->setSubjectClass('Ein Themengebiet', 'de_DE');
     $article->setSubject('subject', 'en_US');
     $article->setSubjectClass('Uma classe de temas', 'pt_BR');
     $article->setType('Typ', 'de_DE');
     $article->setType('type', 'en_US');
     $article->setCoverageGeo('Kaltes Kap', 'de_DE');
     $article->setCoverageGeo('Cabo Frio', 'pt_BR');
     $article->setCoverageChron('Sommer 2012', 'de_DE');
     $article->setCoverageChron('Summer 2012', 'en_US');
     $article->setCoverageSample('Alles', 'de_DE');
     $article->setCoverageSample('everything', 'en_US');
     $article->setDatePublished('2012-03-15 16:45:00');
     $article->setLocale('de_DE');
     return $article;
 }