Skip to content

Commit 1b963f4

Browse files
committed
Merge branch '2.1'
2 parents 1bd1751 + f88572b commit 1b963f4

21 files changed

+123
-74
lines changed

features/bootstrap/FeatureContext.php

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ public function dropDatabase()
122122
}
123123

124124
/**
125-
* @Given there is :nb dummy objects
125+
* @Given there are :nb dummy objects
126126
*/
127-
public function thereIsDummyObjects(int $nb)
127+
public function thereAreDummyObjects(int $nb)
128128
{
129129
$descriptions = ['Smart dummy.', 'Not so smart dummy.'];
130130

@@ -183,9 +183,9 @@ public function thereAreFooDummyObjectsWithFakeNames($nb)
183183
}
184184

185185
/**
186-
* @Given there is :nb dummy group objects
186+
* @Given there are :nb dummy group objects
187187
*/
188-
public function thereIsDummyGroupObjects(int $nb)
188+
public function thereAreDummyGroupObjects(int $nb)
189189
{
190190
for ($i = 1; $i <= $nb; ++$i) {
191191
$dummyGroup = new DummyGroup();
@@ -201,9 +201,9 @@ public function thereIsDummyGroupObjects(int $nb)
201201
}
202202

203203
/**
204-
* @Given there is :nb dummy property objects
204+
* @Given there are :nb dummy property objects
205205
*/
206-
public function thereIsDummyPropertyObjects(int $nb)
206+
public function thereAreDummyPropertyObjects(int $nb)
207207
{
208208
for ($i = 1; $i <= $nb; ++$i) {
209209
$dummyProperty = new DummyProperty();
@@ -225,7 +225,7 @@ public function thereIsDummyPropertyObjects(int $nb)
225225
/**
226226
* @Given there are :nb embedded dummy objects
227227
*/
228-
public function thereIsEmbeddedDummyObjects(int $nb)
228+
public function thereAreEmbeddedDummyObjects(int $nb)
229229
{
230230
for ($i = 1; $i <= $nb; ++$i) {
231231
$dummy = new EmbeddedDummy();
@@ -242,9 +242,9 @@ public function thereIsEmbeddedDummyObjects(int $nb)
242242
}
243243

244244
/**
245-
* @Given there is :nb dummy objects with relatedDummy
245+
* @Given there are :nb dummy objects with relatedDummy
246246
*/
247-
public function thereIsDummyObjectsWithRelatedDummy(int $nb)
247+
public function thereAreDummyObjectsWithRelatedDummy(int $nb)
248248
{
249249
for ($i = 1; $i <= $nb; ++$i) {
250250
$relatedDummy = new RelatedDummy();
@@ -263,9 +263,9 @@ public function thereIsDummyObjectsWithRelatedDummy(int $nb)
263263
}
264264

265265
/**
266-
* @Given there is :nb dummy objects with relatedDummy and its thirdLevel
266+
* @Given there are :nb dummy objects with relatedDummy and its thirdLevel
267267
*/
268-
public function thereIsDummyObjectsWithRelatedDummyAndItsThirdLevel(int $nb)
268+
public function thereAreDummyObjectsWithRelatedDummyAndItsThirdLevel(int $nb)
269269
{
270270
for ($i = 1; $i <= $nb; ++$i) {
271271
$thirdLevel = new ThirdLevel();
@@ -288,9 +288,9 @@ public function thereIsDummyObjectsWithRelatedDummyAndItsThirdLevel(int $nb)
288288
}
289289

290290
/**
291-
* @Given there is :nb dummy objects with embeddedDummy
291+
* @Given there are :nb dummy objects with embeddedDummy
292292
*/
293-
public function thereIsDummyObjectsWithEmbeddedDummy(int $nb)
293+
public function thereAreDummyObjectsWithEmbeddedDummy(int $nb)
294294
{
295295
for ($i = 1; $i <= $nb; ++$i) {
296296
$embeddableDummy = new EmbeddableDummy();
@@ -307,9 +307,9 @@ public function thereIsDummyObjectsWithEmbeddedDummy(int $nb)
307307
}
308308

309309
/**
310-
* @Given there is :nb dummy objects having each :nbrelated relatedDummies
310+
* @Given there are :nb dummy objects having each :nbrelated relatedDummies
311311
*/
312-
public function thereIsDummyObjectsWithRelatedDummies(int $nb, int $nbrelated)
312+
public function thereAreDummyObjectsWithRelatedDummies(int $nb, int $nbrelated)
313313
{
314314
for ($i = 1; $i <= $nb; ++$i) {
315315
$dummy = new Dummy();
@@ -332,9 +332,9 @@ public function thereIsDummyObjectsWithRelatedDummies(int $nb, int $nbrelated)
332332
}
333333

334334
/**
335-
* @Given there is :nb dummy objects with dummyDate
335+
* @Given there are :nb dummy objects with dummyDate
336336
*/
337-
public function thereIsDummyObjectsWithDummyDate(int $nb)
337+
public function thereAreDummyObjectsWithDummyDate(int $nb)
338338
{
339339
$descriptions = ['Smart dummy.', 'Not so smart dummy.'];
340340

@@ -358,9 +358,9 @@ public function thereIsDummyObjectsWithDummyDate(int $nb)
358358
}
359359

360360
/**
361-
* @Given there is :nb dummy objects with dummyDate and dummyBoolean :bool
361+
* @Given there are :nb dummy objects with dummyDate and dummyBoolean :bool
362362
*/
363-
public function thereIsDummyObjectsWithDummyDateAndDummyBoolean(int $nb, string $bool)
363+
public function thereAreDummyObjectsWithDummyDateAndDummyBoolean(int $nb, string $bool)
364364
{
365365
$descriptions = ['Smart dummy.', 'Not so smart dummy.'];
366366

@@ -394,9 +394,9 @@ public function thereIsDummyObjectsWithDummyDateAndDummyBoolean(int $nb, string
394394
}
395395

396396
/**
397-
* @Given there is :nb dummy objects with dummyDate and relatedDummy
397+
* @Given there are :nb dummy objects with dummyDate and relatedDummy
398398
*/
399-
public function thereIsDummyObjectsWithDummyDateAndRelatedDummy(int $nb)
399+
public function thereAreDummyObjectsWithDummyDateAndRelatedDummy(int $nb)
400400
{
401401
for ($i = 1; $i <= $nb; ++$i) {
402402
$date = new \DateTime(sprintf('2015-04-%d', $i), new \DateTimeZone('UTC'));
@@ -422,9 +422,9 @@ public function thereIsDummyObjectsWithDummyDateAndRelatedDummy(int $nb)
422422
}
423423

424424
/**
425-
* @Given there is :nb embedded dummy objects with dummyDate and embeddedDummy
425+
* @Given there are :nb embedded dummy objects with dummyDate and embeddedDummy
426426
*/
427-
public function thereIsDummyObjectsWithDummyDateAndEmbeddedDummy(int $nb)
427+
public function thereAreDummyObjectsWithDummyDateAndEmbeddedDummy(int $nb)
428428
{
429429
for ($i = 1; $i <= $nb; ++$i) {
430430
$date = new \DateTime(sprintf('2015-04-%d', $i), new \DateTimeZone('UTC'));
@@ -448,9 +448,9 @@ public function thereIsDummyObjectsWithDummyDateAndEmbeddedDummy(int $nb)
448448
}
449449

450450
/**
451-
* @Given there is :nb dummy objects with dummyPrice
451+
* @Given there are :nb dummy objects with dummyPrice
452452
*/
453-
public function thereIsDummyObjectsWithDummyPrice(int $nb)
453+
public function thereAreDummyObjectsWithDummyPrice(int $nb)
454454
{
455455
$descriptions = ['Smart dummy.', 'Not so smart dummy.'];
456456
$prices = ['9.99', '12.99', '15.99', '19.99'];
@@ -469,9 +469,9 @@ public function thereIsDummyObjectsWithDummyPrice(int $nb)
469469
}
470470

471471
/**
472-
* @Given there is :nb dummy objects with dummyBoolean :bool
472+
* @Given there are :nb dummy objects with dummyBoolean :bool
473473
*/
474-
public function thereIsDummyObjectsWithDummyBoolean(int $nb, string $bool)
474+
public function thereAreDummyObjectsWithDummyBoolean(int $nb, string $bool)
475475
{
476476
if (in_array($bool, ['true', '1', 1], true)) {
477477
$bool = true;
@@ -497,9 +497,9 @@ public function thereIsDummyObjectsWithDummyBoolean(int $nb, string $bool)
497497
}
498498

499499
/**
500-
* @Given there is :nb embedded dummy objects with embeddedDummy.dummyBoolean :bool
500+
* @Given there are :nb embedded dummy objects with embeddedDummy.dummyBoolean :bool
501501
*/
502-
public function thereIsDummyObjectsWithEmbeddedDummyBoolean(int $nb, string $bool)
502+
public function thereAreDummyObjectsWithEmbeddedDummyBoolean(int $nb, string $bool)
503503
{
504504
if (in_array($bool, ['true', '1', 1], true)) {
505505
$bool = true;
@@ -524,9 +524,9 @@ public function thereIsDummyObjectsWithEmbeddedDummyBoolean(int $nb, string $boo
524524
}
525525

526526
/**
527-
* @Given there is :nb embedded dummy objects with relatedDummy.embeddedDummy.dummyBoolean :bool
527+
* @Given there are :nb embedded dummy objects with relatedDummy.embeddedDummy.dummyBoolean :bool
528528
*/
529-
public function thereIsDummyObjectsWithRelationEmbeddedDummyBoolean(int $nb, string $bool)
529+
public function thereAreDummyObjectsWithRelationEmbeddedDummyBoolean(int $nb, string $bool)
530530
{
531531
if (in_array($bool, ['true', '1', 1], true)) {
532532
$bool = true;
@@ -823,9 +823,9 @@ public function createPeopleWithPets()
823823
}
824824

825825
/**
826-
* @Given there is :nb dummydate objects with dummyDate
826+
* @Given there are :nb dummydate objects with dummyDate
827827
*/
828-
public function thereIsDummyDateObjectsWithDummyDate(int $nb)
828+
public function thereAreDummyDateObjectsWithDummyDate(int $nb)
829829
{
830830
for ($i = 1; $i <= $nb; ++$i) {
831831
$date = new \DateTime(sprintf('2015-04-%d', $i), new \DateTimeZone('UTC'));

features/doctrine/boolean_filter.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Feature: Boolean filter on collections
55

66
@createSchema
77
Scenario: Get collection by dummyBoolean true
8-
Given there is "15" dummy objects with dummyBoolean true
9-
And there is "10" dummy objects with dummyBoolean false
8+
Given there are 15 dummy objects with dummyBoolean true
9+
And there are 10 dummy objects with dummyBoolean false
1010
When I send a "GET" request to "/dummies?dummyBoolean=true"
1111
Then the response status code should be 200
1212
And the response should be in JSON
@@ -167,8 +167,8 @@ Feature: Boolean filter on collections
167167
And the JSON node "hydra:totalItems" should be equal to 10
168168

169169
Scenario: Get collection by embeddedDummy.dummyBoolean true
170-
Given there is "15" embedded dummy objects with embeddedDummy.dummyBoolean true
171-
And there is "10" embedded dummy objects with embeddedDummy.dummyBoolean false
170+
Given there are 15 embedded dummy objects with embeddedDummy.dummyBoolean true
171+
And there are 10 embedded dummy objects with embeddedDummy.dummyBoolean false
172172
When I send a "GET" request to "/embedded_dummies?embeddedDummy.dummyBoolean=true"
173173
Then the response status code should be 200
174174
And the response should be in JSON
@@ -329,8 +329,8 @@ Feature: Boolean filter on collections
329329
And the JSON node "hydra:totalItems" should be equal to 10
330330

331331
Scenario: Get collection by association with embed relatedDummy.embeddedDummy.dummyBoolean true
332-
Given there is "15" embedded dummy objects with relatedDummy.embeddedDummy.dummyBoolean true
333-
And there is "10" embedded dummy objects with relatedDummy.embeddedDummy.dummyBoolean false
332+
Given there are 15 embedded dummy objects with relatedDummy.embeddedDummy.dummyBoolean true
333+
And there are 10 embedded dummy objects with relatedDummy.embeddedDummy.dummyBoolean false
334334
When I send a "GET" request to "/embedded_dummies?relatedDummy.embeddedDummy.dummyBoolean=true"
335335
Then the response status code should be 200
336336
And the response should be in JSON

features/doctrine/date_filter.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Date filter on collections
55

66
@createSchema
77
Scenario: Get collection filtered by date
8-
Given there is "30" dummy objects with dummyDate
8+
Given there are 30 dummy objects with dummyDate
99
When I send a "GET" request to "/dummies?dummyDate[after]=2015-04-28"
1010
Then the response status code should be 200
1111
And the response should be in JSON
@@ -266,7 +266,7 @@ Feature: Date filter on collections
266266

267267
@dropSchema
268268
Scenario: Get collection filtered by association date
269-
Given there is "30" dummy objects with dummyDate and relatedDummy
269+
Given there are 30 dummy objects with dummyDate and relatedDummy
270270
When I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28"
271271
Then the response status code should be 200
272272
And the response should be in JSON
@@ -387,7 +387,7 @@ Feature: Date filter on collections
387387
@dropSchema
388388
@createSchema
389389
Scenario: Get collection filtered by association date
390-
Given there is "2" dummy objects with dummyDate and relatedDummy
390+
Given there are 2 dummy objects with dummyDate and relatedDummy
391391
When I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28"
392392
Then the response status code should be 200
393393
And the response should be in JSON
@@ -669,7 +669,7 @@ Feature: Date filter on collections
669669
@dropSchema
670670
@createSchema
671671
Scenario: Get collection filtered by date that is not a datetime
672-
Given there is "30" dummydate objects with dummyDate
672+
Given there are 30 dummydate objects with dummyDate
673673
When I send a "GET" request to "/dummy_dates?dummyDate[after]=2015-04-28"
674674
Then the response status code should be 200
675675
And the response should be in JSON
@@ -678,7 +678,7 @@ Feature: Date filter on collections
678678
@dropSchema
679679
@createSchema
680680
Scenario: Get collection filtered by embedded date
681-
Given there is "2" embedded dummy objects with dummyDate and embeddedDummy
681+
Given there are 2 embedded dummy objects with dummyDate and embeddedDummy
682682
When I send a "GET" request to "/embedded_dummies?embeddedDummy.dummyDate[after]=2015-04-28"
683683
Then the response status code should be 200
684684
And the response should be in JSON

features/doctrine/exists_filter.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Exists filter on collections
55

66
@createSchema
77
Scenario: Get collection where exists does not exist
8-
Given there is "15" dummy objects with dummyBoolean true
8+
Given there are 15 dummy objects with dummyBoolean true
99
When I send a "GET" request to "/dummies?dummyBoolean[exists]=0"
1010
Then the response status code should be 200
1111
And the response should be in JSON

features/doctrine/multiple_filter.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Feature: Multiple filters on collections
66
@createSchema
77
@dropSchema
88
Scenario: Get collection filtered by multiple parameters
9-
Given there is "30" dummy objects with dummyDate and dummyBoolean true
10-
And there is "20" dummy objects with dummyDate and dummyBoolean false
9+
Given there are 30 dummy objects with dummyDate and dummyBoolean true
10+
And there are 20 dummy objects with dummyDate and dummyBoolean false
1111
When I send a "GET" request to "/dummies?dummyDate[after]=2015-04-28&dummyBoolean=1"
1212
Then the response status code should be 200
1313
And the response should be in JSON

features/doctrine/numeric_filter.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Numeric filter on collections
55

66
@createSchema
77
Scenario: Get collection by dummyPrice=9.99
8-
Given there is "10" dummy objects with dummyPrice
8+
Given there are 10 dummy objects with dummyPrice
99
When I send a "GET" request to "/dummies?dummyPrice=9.99"
1010
Then the response status code should be 200
1111
And the response should be in JSON
@@ -49,7 +49,7 @@ Feature: Numeric filter on collections
4949

5050
@dropSchema
5151
Scenario: Get collection by non-numeric dummyPrice=marty
52-
Given there is "10" dummy objects with dummyPrice
52+
Given there are 10 dummy objects with dummyPrice
5353
When I send a "GET" request to "/dummies?dummyPrice=marty"
5454
Then the response status code should be 200
5555
And the response should be in JSON

features/doctrine/order_filter.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Order filter on collections
55

66
@createSchema
77
Scenario: Get collection ordered in ascending order on an integer property and on which order filter has been enabled in whitelist mode
8-
Given there is "30" dummy objects
8+
Given there are 30 dummy objects
99
When I send a "GET" request to "/dummies?order[id]=asc"
1010
Then the response status code should be 200
1111
And the response should be in JSON
@@ -301,7 +301,7 @@ Feature: Order filter on collections
301301
"""
302302

303303
Scenario: Get collection ordered in ascending order on an association and on which order filter has been enabled in whitelist mode
304-
Given there is "30" dummy objects with relatedDummy
304+
Given there are 30 dummy objects with relatedDummy
305305
When I send a "GET" request to "/dummies?order[relatedDummy]=asc"
306306
Then the response status code should be 200
307307
And the response should be in JSON
@@ -361,7 +361,7 @@ Feature: Order filter on collections
361361
"""
362362

363363
Scenario: Get collection ordered in ascending order on an embedded and on which order filter has been enabled in whitelist mode
364-
Given there is "30" dummy objects with embeddedDummy
364+
Given there are 30 dummy objects with embeddedDummy
365365
When I send a "GET" request to "/embedded_dummies?order[embeddedDummy]=asc"
366366
Then the response status code should be 200
367367
And the response should be in JSON

features/doctrine/range_filter.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Range filter on collections
55

66
@createSchema
77
Scenario: Get collection filtered by range (between)
8-
Given there is "30" dummy objects with dummyPrice
8+
Given there are 30 dummy objects with dummyPrice
99
When I send a "GET" request to "/dummies?dummyPrice[between]=12.99..15.99"
1010
Then the response status code should be 200
1111
And the response should be in JSON

features/doctrine/search_filter.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Feature: Search filter on collections
113113
"""
114114

115115
Scenario: Search collection by name (partial)
116-
Given there is "30" dummy objects
116+
Given there are 30 dummy objects
117117
When I send a "GET" request to "/dummies?name=my"
118118
Then the response status code should be 200
119119
And the response should be in JSON
@@ -153,7 +153,7 @@ Feature: Search filter on collections
153153
"""
154154

155155
Scenario: Search collection by name (partial)
156-
Given there are "30" embedded dummy objects
156+
Given there are 30 embedded dummy objects
157157
When I send a "GET" request to "/embedded_dummies?embeddedDummy.dummyName=my"
158158
Then the response status code should be 200
159159
And the response should be in JSON
@@ -372,7 +372,7 @@ Feature: Search filter on collections
372372
@createSchema
373373
@dropSchema
374374
Scenario: Search related collection by name
375-
Given there is 3 dummy objects having each 3 relatedDummies
375+
Given there are 3 dummy objects having each 3 relatedDummies
376376
When I add "Accept" header equal to "application/hal+json"
377377
And I send a "GET" request to "/dummies?relatedDummies.name=RelatedDummy1"
378378
Then the response status code should be 200
@@ -384,7 +384,7 @@ Feature: Search filter on collections
384384

385385
@createSchema
386386
Scenario: Get collection by id equals 9.99 which is not possible
387-
Given there is "30" dummy objects
387+
Given there are 30 dummy objects
388388
When I send a "GET" request to "/dummies?id=9.99"
389389
Then the response status code should be 200
390390
And the response should be in JSON

features/filter/property_filter.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Set properties to include
55

66
@createSchema
77
Scenario: Test properties filter
8-
Given there is 1 dummy objects with relatedDummy and its thirdLevel
8+
Given there are 1 dummy objects with relatedDummy and its thirdLevel
99
When I send a "GET" request to "/dummies/1?properties[]=name&properties[]=alias&properties[]=relatedDummy"
1010
And the JSON node "name" should be equal to "Dummy #1"
1111
And the JSON node "alias" should be equal to "Alias #0"

0 commit comments

Comments
 (0)