Пример #1
0
 public function finish()
 {
     try {
         $message = Message::createFromXml(parent::getResult());
     } catch (Exception $ex) {
         $this->server->failed();
         return;
     }
     $this->server->setLocationName($message->fromServer());
     foreach ($message->getNewServers() as $s) {
         $this->reader->serverSuggested($s);
     }
     $list = new ExternalBookList($message->fromServer(), $message->bookList());
     if ($list->size()) {
         $this->reader->addBookList($list);
     }
 }
 function testExternalBookList()
 {
     $bookList = array(new ExternalBook('http://bla/', 'Linke, Maikel', 'uBook - Die Bücherbörse', '0'));
     $list = new ExternalBookList('Test', $bookList);
     $this->assertEquals(1, $list->size());
 }