Exemplo n.º 1
0
 /** @test */
 public function resetResetsAllRegisteredSortingObservers()
 {
     $sortingObserverMock1 = $this->getMock('Tx_PtExtlist_Domain_Model_Sorting_SortingObserverInterface', array('getSortingStateCollection', 'registerSorter', 'resetSorting', 'resetToDefaultSorting'), array(), '', FALSE);
     /* @var $sortingObserverMock Tx_PtExtlist_Domain_Model_Sorting_SortingObserverInterface */
     $sortingObserverMock1->expects($this->once())->method('resetSorting');
     $sortingObserverMock2 = $this->getMock('Tx_PtExtlist_Domain_Model_Sorting_SortingObserverInterface', array('getSortingStateCollection', 'registerSorter', 'resetSorting', 'resetToDefaultSorting'), array(), '', FALSE);
     /* @var $sortingObserverMock Tx_PtExtlist_Domain_Model_Sorting_SortingObserverInterface */
     $sortingObserverMock2->expects($this->once())->method('resetSorting');
     $sorter = new Tx_PtExtlist_Domain_Model_Sorting_Sorter();
     $sorter->registerSortingObserver($sortingObserverMock1);
     $sorter->registerSortingObserver($sortingObserverMock2);
     $sorter->reset();
 }
 /**
  * Reset sorting to default sorting (configured in TS)
  */
 public function resetSortingToDefault()
 {
     $this->sorter->resetToDefault();
     $this->resetListDataCache();
 }