Skip to content

Commit 53fbc96

Browse files
committed
Improve functional test: assert directly on raw response content instead of json_decode
1 parent df63014 commit 53fbc96

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConnectionsControllerTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,7 @@ public function pushing_idp_with_discovery_missing_english_name_returns_bad_requ
426426
$this->assertJson($client->getResponse()->getContent());
427427
$isContentTypeJson = $client->getResponse()->headers->contains('Content-Type', 'application/json');
428428
$this->assertTrue($isContentTypeJson, 'Response should have Content-Type: application/json header');
429-
$message = json_decode($client->getResponse()->getContent());
430-
$this->assertStringContainsString('name_en', $message);
429+
$this->assertStringContainsString('name_en', $client->getResponse()->getContent());
431430
}
432431

433432
public static function invalidHttpMethodProvider()

0 commit comments

Comments
 (0)