public function testScrollId()
 {
     $search = $this->_prepareSearch('test_3', 1, 2);
     $scanAndScroll = new ScanAndScroll($search);
     $scanAndScroll->sizePerShard = 1;
     $scanAndScroll->rewind();
     $this->assertEquals($scanAndScroll->current()->getResponse()->getScrollId(), $scanAndScroll->key());
 }
Пример #2
0
 /**
  * query size revert options.
  *
  * @group functional
  */
 public function testQuerySizeRevert()
 {
     $search = $this->_prepareSearch();
     $search->getQuery()->setSize(9);
     $scanAndScroll = new ScanAndScroll($search);
     $scanAndScroll->rewind();
     $this->assertEquals(9, $search->getQuery()->getParam('size'));
     $scanAndScroll->next();
     $this->assertEquals(9, $search->getQuery()->getParam('size'));
 }