Php Codeception sendPOST无法使用Slim 3 getParam

Php Codeception sendPOST无法使用Slim 3 getParam,php,phpunit,codeception,slim-3,psr-7,Php,Phpunit,Codeception,Slim 3,Psr 7,对Codeception相对较新,并尝试将其连接到Slim 3。 为POST请求设置基本测试,如下所示: $I->sendPOST('/user', [ 'details' => [ 'id' => 0, 'package_id' => 0, 'order_id' => 0 ] ]); 在路线本身上,我使用Slim 3的getParam获取我发送的详细信

对Codeception相对较新,并尝试将其连接到Slim 3。 为POST请求设置基本测试,如下所示:

$I->sendPOST('/user', [
        'details' => [
            'id' => 0,
            'package_id' => 0,
            'order_id' => 0
        ]
    ]);
在路线本身上,我使用Slim 3的getParam获取我发送的详细信息,如下所示:

$details = $request->getParam('details', []);
通过--debug运行测试,我看到请求具有
{“details”:{“package_id”:0,“order_id”:0}

但是,似乎来自getParam的详细信息没有返回任何内容。 我试着在细节之外单独发送,但没有效果

此时,我想知道我通过Codeception的sendPOST发送的详细信息与Slim 3的getParam之间是否存在PSR-7兼容性问题,因为Slim的getParam方法附带了以下注释:

 * Fetch request parameter value from body or query string (in that order).
 *
 * Note: This method is not part of the PSR-7 standard.

非常感谢您的帮助!

详细信息应在ParsedBody中提供,是否有类似getParsedBody()的方法在Slim?中,请查看并查看可用于检索该参数的Slim请求方法。@Naktibalda hi感谢您的建议。我让代码搁置了一天,第二天再次运行测试时,由于某种原因,它起了作用……但您的链接确实帮助我了解了更多情况。我感谢您的帮助!