Closed charescape closed 3 years ago
Yes, you can raise pull request :)
What issue would it solve for you?
@Naktibalda It can testing some edge cases,
for example:
JSON_INVALID_UTF8_IGNORE
Ignore invalid UTF-8 characters. Available as of PHP 7.2.0.
JSON_INVALID_UTF8_SUBSTITUTE
Convert invalid UTF-8 characters to \0xfffd (Unicode Character 'REPLACEMENT CHARACTER') Available as of PHP 7.2.0.
@Naktibalda And I have been busy recently, but I will try to submit a PR as soon as possible :)
If you need to test that, you can use your own json_encode function.
Change $I->sendPost($uri, $data);
to $I->sendPost($uri, json_encode($data, JSON_INVALID_UTF8_IGNORE));
So, $params
can be a string?
Thank you!
currently,
encodeApplicationJson
usejson_encode()
without flags, is there any way to add default flags like:https://github.com/Codeception/module-rest/blob/e314fe772c84ab1f2c0b80f435cc90efa58e7209/src/Codeception/Module/REST.php#L676-L692