Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerbaptiste committed Dec 18, 2020
1 parent 323f975 commit 0e88f59
Show file tree
Hide file tree
Showing 22 changed files with 360 additions and 344 deletions.
5 changes: 5 additions & 0 deletions behat.yml.dist
Expand Up @@ -11,6 +11,7 @@ default:
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand Down Expand Up @@ -45,6 +46,7 @@ postgres:
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand All @@ -64,6 +66,7 @@ mongodb:
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand Down Expand Up @@ -98,6 +101,7 @@ default-coverage:
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\CoverageContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'

Expand All @@ -117,6 +121,7 @@ mongodb-coverage:
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\CoverageContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -21,7 +21,7 @@
"symfony/http-foundation": "^4.4 || ^5.1",
"symfony/http-kernel": "^4.4 || ^5.1",
"symfony/property-access": "^3.4.19 || ^4.4 || ^5.1",
"symfony/property-info": "^3.4 || ^4.4 || ^5.2.x-dev#516cbda5788a37f393df6f0dfd19c25eb926784b",
"symfony/property-info": "^3.4 || ^4.4 || ^5.1@dev",
"symfony/serializer": "^4.4 || ^5.1",
"symfony/web-link": "^4.4 || ^5.1",
"willdurand/negotiation": "^2.0.3 || ^3.0"
Expand Down Expand Up @@ -94,7 +94,7 @@
"elasticsearch/elasticsearch": "To support Elasticsearch.",
"guzzlehttp/guzzle": "To use the HTTP cache invalidation system.",
"ocramius/package-versions": "To display the API Platform's version in the debug bar.",
"phpdocumentor/reflection-docblock": "To support extracting metadata from PHPDoc.",
"phpdocumentor/reflection-docblock": "To support exracting metadata from PHPDoc.",
"psr/cache-implementation": "To use metadata caching.",
"ramsey/uuid": "To support Ramsey's UUID identifiers.",
"symfony/cache": "To have metadata caching when using Symfony integration.",
Expand Down
45 changes: 22 additions & 23 deletions features/doctrine/search_filter.feature
Expand Up @@ -19,7 +19,7 @@ Feature: Search filter on collections
Given there is a DummyCar entity with related colors
When I send a "GET" request to "/dummy_cars?colors.prop=red"
Then the response status code should be 200
And the JSON should be deep equal to:
And the JSON should be equal to:
"""
{
"@context": "/contexts/DummyCar",
Expand Down Expand Up @@ -81,25 +81,25 @@ Feature: Search filter on collections
"hydra:mapping": [
{
"@type": "IriTemplateMapping",
"variable": "availableAt[after]",
"variable": "availableAt[before]",
"property": "availableAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "availableAt[before]",
"variable": "availableAt[strictly_before]",
"property": "availableAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "availableAt[strictly_after]",
"variable": "availableAt[after]",
"property": "availableAt",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "availableAt[strictly_before]",
"variable": "availableAt[strictly_after]",
"property": "availableAt",
"required": false
},
Expand All @@ -111,44 +111,38 @@ Feature: Search filter on collections
},
{
"@type": "IriTemplateMapping",
"variable": "colors",
"property": "colors",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "colors.prop",
"property": "colors.prop",
"variable": "foobar[]",
"property": null,
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "colors[]",
"property": "colors",
"variable": "foobargroups[]",
"property": null,
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "foobar[]",
"variable": "foobargroups_override[]",
"property": null,
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "foobargroups[]",
"property": null,
"variable": "colors.prop",
"property": "colors.prop",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "foobargroups_override[]",
"property": null,
"variable": "colors",
"property": "colors",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "name",
"property": "name",
"variable": "colors[]",
"property": "colors",
"required": false
},
{
Expand Down Expand Up @@ -186,6 +180,12 @@ Feature: Search filter on collections
"variable": "uuid[]",
"property": "uuid",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "name",
"property": "name",
"required": false
}
]
}
Expand Down Expand Up @@ -278,7 +278,6 @@ Feature: Search filter on collections
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And print last JSON response
And the JSON should be valid according to this schema:
"""
{
Expand Down
2 changes: 1 addition & 1 deletion features/graphql/introspection.feature
Expand Up @@ -201,7 +201,7 @@ Feature: GraphQL introspection support
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/json"
And the JSON should be deep equal to:
And the JSON should be equal to:
"""
{
"data": {
Expand Down

0 comments on commit 0e88f59

Please sign in to comment.