/**
  * Test processing of English-language Jane Austen entry.
  *
  * @return void
  */
 public function testEnglishJane()
 {
     $client = $this->getClient('en-austen');
     $wiki = new Wikipedia($client);
     $response = $wiki->get('Jane Austen');
     $this->assertEquals('en', $response['wiki_lang']);
     $this->assertEquals('Jane Austen', $response['name']);
     $this->assertTrue(false !== strstr($response['description'], '16 December 1775'));
 }
Exemple #2
0
 /**
  * Returns info from Wikipedia to the view
  *
  * @reference _parseWikipedia : Home.php (VuFind 1)
  * @refauthor Rushikesh Katikar <*****@*****.**>
  *
  * @return array info = {
  *              'description' : string : extracted/formatted Wikipedia text
  *              'image'       : string : url of the Wikipedia page's image
  *              'altimge'     : string : alt text for the image
  *              'name'        : string : title of Wikipedia article
  *              'wiki_lang'   : string : truncated from the lang. settings
  *           }
  */
 public function getAuthorInfo()
 {
     // Don't load Wikipedia content if Wikipedia is disabled:
     return stristr($this->sources, 'wikipedia') ? $this->wikipedia->get($this->getAuthor()) : null;
 }