Skip to content

Commit d76ac70

Browse files
committed
Add a non regression test for #2285 #2286
1 parent 66d6a98 commit d76ac70

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
mkdir -p build/logs/tmp build/cov
184184
for f in $(find features -name '*.feature' -not -path 'features/main/exposed_state.feature' | circleci tests split --split-by=timings); do
185185
_f=${f//\//_}
186-
FEATURE="${_f}" phpdbg -qrr vendor/bin/behat --profile=coverage --suite=default --tags=~@postgres --format=progress --out=std --format=junit --out=build/logs/tmp/"${_f}" "$f"
186+
FEATURE="${_f}" phpdbg -qrr vendor/bin/behat --profile=coverage --suite=default --format=progress --out=std --format=junit --out=build/logs/tmp/"${_f}" "$f"
187187
done
188188
- run:
189189
name: Merge Behat test reports

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ script:
5252
vendor/bin/behat --suite=default --format=progress;
5353
fi
5454
- tests/Fixtures/app/console api:swagger:export > swagger.json && npx swagger-cli validate swagger.json && rm swagger.json
55-
- tests/Fixtures/app/console api:swagger:export --yaml > swagger.yaml && npx swagger-cli validate --no-schema swagger.yaml && rm swagger.yaml
55+
- tests/Fixtures/app/console api:swagger:export --yaml > swagger.yaml && npx swagger-cli validate swagger.yaml && rm swagger.yaml

tests/Bridge/Symfony/Bundle/Command/SwaggerCommandTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,16 @@ public function testExecuteWithYaml()
6262
operationId: getDummyCarCollection
6363
YAML;
6464

65-
$this->assertContains($expected, $result);
65+
$this->assertContains($expected, $result, 'nested object should be present.');
66+
67+
$expected = <<<YAML
68+
'/dummy_cars/{id}':
69+
get:
70+
tags: []
71+
operationId: getDummyCarItem
72+
YAML;
73+
74+
$this->assertContains($expected, $result, 'arrays should be correctly formatted.');
6675
}
6776

6877
public function testWriteToFile()

tests/Fixtures/TestBundle/Entity/DummyCar.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
/**
2828
* @ApiResource(
29+
* itemOperations={"get"={"swagger_context"={"tags"={}}}, "put", "delete"},
2930
* attributes={
3031
* "normalization_context"={"groups"={"colors"}}
3132
* }

0 commit comments

Comments
 (0)