Skip to content

Commit 80c621a

Browse files
committed
Update json regex to fit more different types of json (ld, problem...)
1 parent ddc4193 commit 80c621a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.2.6
2+
3+
* Fix: Update json regex to fit more different types of json (ld, problem...)
4+
15
## v1.2.5
26

37
* Fix: don't re-scope the expectation callback, to avoid issues with static closures

src/FunctionalSmokeTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function runFunctionalTest(FunctionalTestData $testData): void {
127127

128128
if ($testData->getIsJsonResponseExpectation()) {
129129
$header = $res->headers->get('Content-Type');
130-
Assert::assertMatchesRegularExpression('~application/(ld\+)?json~iU', $header);
130+
Assert::assertMatchesRegularExpression('~application/(\w+\+)?json~iU', $header);
131131

132132
$resBody = $res->getContent();
133133
$json = @json_decode($resBody, true);

0 commit comments

Comments
 (0)