From 698d61d87a7ced83d2c9afa5479d5c38caa3dc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Malisak?= Date: Tue, 11 Jun 2024 09:33:06 +0200 Subject: [PATCH] Add Accept: application/json header to AsJson step --- src/Codeception/Step/AsJson.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Codeception/Step/AsJson.php b/src/Codeception/Step/AsJson.php index 78acdf2..53b8a18 100644 --- a/src/Codeception/Step/AsJson.php +++ b/src/Codeception/Step/AsJson.php @@ -9,6 +9,7 @@ class AsJson extends Action implements GeneratedStep { public function run(ModuleContainer $container = null) { + $container->getModule('REST')->haveHttpHeader('Accept', 'application/json'); $container->getModule('REST')->haveHttpHeader('Content-Type', 'application/json'); $resp = parent::run($container); $container->getModule('REST')->seeResponseIsJson();