/** @test */
 public function containedFiltersHaveCorrectAccessRights()
 {
     $filterBoxConfig = $this->configurationBuilderMock->getFilterboxConfigurationByFilterboxIdentifier('testfilterbox');
     $filterbox = $this->filterboxFactory->createInstance($filterBoxConfig);
     $accessableFilterBox = $this->filterboxFactory->createAccessableInstance($filterbox);
     // AccessGroups are configured for filter2 -> should not be allowed to access.
     $this->assertTrue($accessableFilterBox->hasItem('filter1'));
     $this->assertFalse($accessableFilterBox->hasItem('filter2'));
 }
Ejemplo n.º 2
0
 /**
  * Returns a new filterbox with accessable filters only.
  *
  * @return Tx_PtExtlist_Domain_Model_Filter_Filterbox
  */
 public function getAccessableFilterbox()
 {
     return $this->filterboxFactory->createAccessableInstance($this);
 }