/**
  * Lists all sims location matching a criteria
  */
 public function locationAction()
 {
     // Check if the user is allowed to perform this action
     $dumbSim = new Application\Model\SimModel();
     $this->_helper->allowed('list', $dumbSim);
     $filterList = $this->_simSrv->buildFilterList($this->getRequest()->getParams());
     if (is_null($filterList)) {
         $filterList = new App_ListFilter();
     }
     $this->_helper->filterNotAllowedFilters('filter_by', $filterList);
     if ($this->_hasParam('limit')) {
         $limit = $this->_getParam('limit');
     } else {
         $limit = null;
     }
     $simList = $this->_simSrv->listLocations($filterList, $limit);
     $this->_checkReadRights($simList);
     $this->view->data = $simList->getItems();
     $this->view->count = $simList->getCount();
 }
 public function testListLocations()
 {
     $filterList = $this->_service->buildFilterList(array(\Application\Model\Sorting\SimSortingFields::SIM_TYPE => \Application\Model\SimModel::SIM_TYPE_GLOBAL));
     $result = $this->_service->listLocations($filterList, 200);
     $this->assertNotNull($result);
 }