public function testCollectNotAllowedNumberOfEntities()
 {
     $state = ['filters' => [], 'sorters' => []];
     $hash = md5(json_encode($state));
     $scope = EntityPaginationManager::VIEW_SCOPE;
     $entityIds = [1, 2, 3];
     $paginationLimit = 2;
     $this->setPaginationEnabled(true);
     $this->setPaginationLimit($paginationLimit);
     $this->buildDataGrid(true, $state, $scope, $entityIds, $paginationLimit);
     $this->storage->expects($this->once())->method('hasData')->with(self::ENTITY_NAME, $hash, $scope)->will($this->returnValue(false));
     $this->storage->expects($this->once())->method('setData')->with(self::ENTITY_NAME, $hash, [], $scope);
     $this->assertTrue($this->collector->collect($this->getGridRequest(), $scope));
 }
 /**
  * @param string $scope
  * @return bool
  */
 public function collectData($scope)
 {
     return $this->dataCollector->collect($this->request, $scope);
 }