Ejemplo n.º 1
0
 /** @test */
 public function setFilterValueSetsFilterValueAsExpected()
 {
     $filterValue = 'testFilterValue';
     $filterboxFilterIdentifier = 'testfilterbox.testfilter';
     $filterMock = $this->getFilterMock($filterValue);
     $filterBoxCollectionMock = $this->getMock('Tx_PtExtlist_Domain_Model_Filter_FilterboxCollection', array('getFilterByFullFiltername'), array(), '', FALSE);
     $filterBoxCollectionMock->expects($this->once())->method('getFilterByFullFiltername')->with($filterboxFilterIdentifier)->will($this->returnValue($filterMock));
     $dataBackendMock = $this->getMock('Tx_PtExtlist_Domain_DataBackend_Typo3DataBackend_Typo3DataBackend', array('getFilterBoxCollection'), array(), '', FALSE);
     $dataBackendMock->expects($this->once())->method('getFilterBoxCollection')->will($this->returnValue($filterBoxCollectionMock));
     $extlistContext = new Tx_PtExtlist_ExtlistContext_ExtlistContext();
     $extlistContext->_injectDataBackend($dataBackendMock);
     $extlistContext->setFilterValue('testfilterbox', 'testfilter', $filterValue, FALSE);
 }
 /**
  * Build the configuration builder with settings from the given extlistTypoScriptConfigurationPath
  *
  * @return Tx_PtExtlist_Domain_Configuration_ConfigurationBuilder
  * @throws Exception
  */
 protected function buildConfigurationBuilder()
 {
     $this->configurationBuilder = $this->extListContext->getConfigurationBuilder();
 }