Skip to content

Mock_Request_b57bf260::getRawBody() #8

@MChechel

Description

@MChechel

Hello,

I have a problem with making functional tests with current module.

I receive the next error:
[TypeError] Return value of Mock_Request_b57bf260::getRawBody() must be of the type string, null returned

In previous versions here was check for null value and if it is null, empty string was placed instead.
https://github.com/Codeception/module-phalcon5/blob/main/src/Codeception/Lib/Connector/Phalcon5.php::121

$di['request'] = Stub::construct($phRequest, [], ['getRawBody' => $request->getContent()]);

But now the value of $request->getContent() is not checked.

Could @niden or someone please tell, do i need to set up request content additionally withing bootstrap.php for functional tests, or Phalcon5.php has to be updated and something like this will appear?
$di['request'] = Stub::construct($phRequest, [], ['getRawBody' => $request->getContent() ?: '' ]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions