Esempio n. 1
0
 /**
  * Set up the view helper test
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // prepare solr request handler
     $solrRequestHandler = GeneralUtility::makeInstance('ApacheSolrForTypo3\\Solr\\Search', $this->getDumbMock('ApacheSolrForTypo3\\Solr\\SolrService'));
     // init view helper
     $this->viewHelper = GeneralUtility::makeInstance('ApacheSolrForTypo3\\Solr\\ViewHelper\\Relevance');
 }
Esempio n. 2
0
 /**
  * Set up the view helper test
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // set sorting configuration
     $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['search.']['sorting'] = 1;
     $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['search.']['sorting.'] = array('defaultOrder' => 'asc', 'options.' => array('title.' => array('field' => 'sortTitle', 'label' => 'Title'), 'type.' => array('field' => 'type', 'label' => 'Title'), 'author.' => array('field' => 'sortAuthor', 'label' => 'Author', 'fixedOrder' => 'desc')));
     // prepare solr request handler
     $solrRequestHandler = GeneralUtility::makeInstance('ApacheSolrForTypo3\\Solr\\Search', $this->getDumbMock('ApacheSolrForTypo3\\Solr\\SolrService'));
     $this->inject($solrRequestHandler, 'query', GeneralUtility::makeInstance('ApacheSolrForTypo3\\Solr\\Query', 'testQuery'));
     // prepare link builder mock
     $linkBuilderMock = $this->getDumbMock('ApacheSolrForTypo3\\Solr\\Query\\LinkBuilder');
     $linkBuilderMock->expects($this->any())->method('getQueryUrl')->willReturnArgument(0);
     // init view helper
     $this->viewHelper = GeneralUtility::makeInstance('ApacheSolrForTypo3\\Solr\\ViewHelper\\SortUrl');
     $this->inject($this->viewHelper, 'queryLinkBuilder', $linkBuilderMock);
 }
Esempio n. 3
0
 /**
  * Set up the view helper test
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     date_default_timezone_set('Europe/Berlin');
 }