Skip to content
Snippets Groups Projects
Unverified Commit b535f59a authored by Simonas Šerlinskas's avatar Simonas Šerlinskas
Browse files

Merge remote-tracking branch 'remotes/upstream/5.x'

parents 44fb5480 a9e4bfe3
No related branches found
No related tags found
No related merge requests found
...@@ -26,4 +26,4 @@ script: ...@@ -26,4 +26,4 @@ script:
- vendor/bin/phpunit --coverage-clover=coverage.clover - vendor/bin/phpunit --coverage-clover=coverage.clover
- vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor/ ./ - vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor/ ./
after_script: after_script:
- vendor/bin/coveralls - travis_retry php vendor/bin/coveralls
...@@ -640,6 +640,9 @@ class Search ...@@ -640,6 +640,9 @@ class Search
public function setScroll($scroll = '5m') public function setScroll($scroll = '5m')
{ {
$this->scroll = $scroll; $this->scroll = $scroll;
$this->addUriParam('scroll', $this->scroll);
return $this; return $this;
} }
...@@ -668,6 +671,7 @@ class Search ...@@ -668,6 +671,7 @@ class Search
'from', 'from',
'size', 'size',
'search_type', 'search_type',
'scroll',
])) { ])) {
$this->uriParams[$name] = $value; $this->uriParams[$name] = $value;
} else { } else {
......
...@@ -29,4 +29,12 @@ class SearchTest extends \PHPUnit_Framework_TestCase ...@@ -29,4 +29,12 @@ class SearchTest extends \PHPUnit_Framework_TestCase
{ {
$this->assertInstanceOf('ONGR\ElasticsearchDSL\Search', new Search()); $this->assertInstanceOf('ONGR\ElasticsearchDSL\Search', new Search());
} }
public function testScrollUriParameter()
{
$search = new Search();
$search->setScroll('5m');
$this->assertArrayHasKey('scroll', $search->getUriParams());
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment