File tree 4 files changed +36
-11
lines changed
test/lib/Elastica/Test/Query
4 files changed +36
-11
lines changed Original file line number Diff line number Diff line change 1
- src_dir : .
1
+ src_dir : lib
2
2
service_name : travis-ci
3
- coverage_clover :
4
- - build/coverage/clover-functional.xml
5
- - build/coverage/clover-shutdown.xml
6
- - build/coverage/clover-unit.xml
3
+ coverage_clover : build/coverage/*-coverage.xml
Original file line number Diff line number Diff line change @@ -75,16 +75,16 @@ dependencies: prepare
75
75
${SOURCE}
76
76
77
77
phpunit : prepare
78
- phpunit -c test/ --coverage-clover build/coverage/clover- unit.xml --group unit
79
- phpunit -c test/ --coverage-clover build/coverage/clover- functional.xml --group functional
80
- phpunit -c test/ --coverage-clover build/coverage/clover- shutdown.xml --group shutdown
78
+ phpunit -c test/ --coverage-clover build/coverage/unit-coverage .xml --group unit
79
+ phpunit -c test/ --coverage-clover build/coverage/functional-coverage .xml --group functional
80
+ phpunit -c test/ --coverage-clover build/coverage/shutdown-coverage .xml --group shutdown
81
81
82
82
doc : prepare
83
83
phpdoc run -d lib/ -t build/docs
84
84
85
85
# Uses the preconfigured standards in .php_cs
86
86
lint :
87
- php-cs-fixer fix
87
+ php-cs-fixer fix
88
88
89
89
syntax-check :
90
90
php -lf ${SOURCE} ** /* .php
Original file line number Diff line number Diff line change @@ -3,12 +3,11 @@ Elastica: elasticsearch PHP Client
3
3
4
4
[ ![ Latest Stable Version] ( https://poser.pugx.org/ruflin/Elastica/v/stable.png )] ( https://packagist.org/packages/ruflin/elastica )
5
5
[ ![ Build Status] ( https://secure.travis-ci.org/ruflin/Elastica.png?branch=master )] ( http://travis-ci.org/ruflin/Elastica )
6
- [ ![ Coverage Status ] ( https ://coveralls .io/repos /ruflin/Elastica/badge.png )] ( https ://coveralls .io/r /ruflin/Elastica)
6
+ [ ![ codecov.io ] ( http ://codecov .io/github /ruflin/Elastica/coverage.svg?branch=master )] ( http ://codecov .io/github /ruflin/Elastica?branch=master )
7
7
[ ![ Dependency Status] ( https://www.versioneye.com/php/ruflin:elastica/dev-master/badge.svg )] ( https://www.versioneye.com/php/ruflin:elastica/dev-master )
8
8
[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/ruflin/Elastica/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/ruflin/Elastica/?branch=master )
9
9
[ ![ Total Downloads] ( https://poser.pugx.org/ruflin/Elastica/downloads.png )] ( https://packagist.org/packages/ruflin/elastica )
10
10
[ ![ Flattr this git repo] ( http://api.flattr.com/button/flattr-badge-large.png )] ( https://flattr.com/submit/auto?user_id=ruflin&url=https://github.com/ruflin/Elastica&title=Elastica&language=PHP&tags=github&category=software )
11
- [ ![ codecov.io] ( http://codecov.io/github/ruflin/Elastica/coverage.svg?branch=master )] ( http://codecov.io/github/ruflin/Elastica?branch=master )
12
11
[ ![ Join the chat at https://gitter.im/ruflin/Elastica ] ( https://badges.gitter.im/Join%20Chat.svg )] ( https://gitter.im/ruflin/Elastica?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge )
13
12
14
13
All documentation for Elastica can be found under [ Elastica.io] ( http://Elastica.io/ ) .
Original file line number Diff line number Diff line change @@ -154,4 +154,33 @@ public function testSetTimezone()
154
154
$ this ->assertEquals ($ expected , $ query ->toArray ());
155
155
$ this ->assertInstanceOf ('Elastica\Query\QueryString ' , $ query ->setTimezone ($ timezone ));
156
156
}
157
+
158
+ /**
159
+ * @group unit
160
+ */
161
+ public function testSetPhraseSlop ()
162
+ {
163
+ $ phraseSlop = 9 ;
164
+
165
+ $ query = new QueryString ("test " );
166
+ $ query ->setPhraseSlop ($ phraseSlop );
167
+
168
+ $ data = $ query ->toArray ();
169
+ $ this ->assertEquals ($ phraseSlop , $ data ['query_string ' ]['phrase_slop ' ]);
170
+ }
171
+
172
+ /**
173
+ * @group functional
174
+ */
175
+ public function testSetBoost ()
176
+ {
177
+
178
+ $ index = $ this ->_createIndex ();
179
+ $ query = new QueryString ('test ' );
180
+ $ query ->setBoost (1.0 );
181
+
182
+ $ resultSet = $ index ->search ($ query );
183
+
184
+ $ this ->assertEquals (0 , $ resultSet ->count ());
185
+ }
157
186
}
You can’t perform that action at this time.
0 commit comments