public function testGetPaginator()
 {
     $adapterMock = $this->getAdapterMock();
     $paginatorAdapter = new ArrayAdapter(array());
     $adapterMock->expects($this->once())->method('getPaginatorAdapter')->will($this->returnValue($paginatorAdapter));
     $paginator = new Paginator($adapterMock);
     $zendPaginator = $paginator->getPaginator();
     $this->assertInstanceOf('Zend\\Paginator\\Paginator', $zendPaginator);
 }
 /**
  * Gets the filter form
  *
  * @return FilterForm
  */
 public function filterForm()
 {
     $filters = $this->paginator->getFilters();
     $parameters = $this->paginator->getParameters();
     $fm = $this->serviceLocator->getServiceLocator()->get('FormElementManager');
     $form = $fm->get('Nicovogelaar\\Paginator\\Form\\FilterForm', array('filters' => $filters));
     $form->setData(array('query' => $parameters->getQuery(), 'filter' => $parameters->getFilters()));
     return $form;
 }