Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Conversation

nlubisch
Copy link

This test covers json_decode depth parameter error handling.
It tests depth for zero and depth for lower than zero.

This Test was contributed by the PHP Usergroup Münster (phpugms)

@krakjoe
Copy link
Contributor

krakjoe commented Oct 23, 2017

This probably belongs in ext/json/json_decode_error.phpt

@nlubisch
Copy link
Author

nlubisch commented Oct 23, 2017

So i should append my tests to the file ext/json/tests/json_decode_error.phpt?

I've read here, that the test output should be kept at a maximum of 10 lines. The other test (json_decode_error.phpt) already has 11 lines so i decided it is time to start a new one.

@krakjoe
Copy link
Contributor

krakjoe commented Oct 25, 2017

Confusing information is confusing ... sorry about that ...

The guidelines make a distinction between tests with 10 lines, and tests with thousands of lines ... at this point, I think it would be sensible to avoid creating additional files for the sake of a few lines of test code when another file with 9 lines already exists ... so long as we don't take it to the extremes that the guidelines are trying to warn you about, I think that's okay ...

@nlubisch nlubisch force-pushed the json_decode_depth_error branch from 5e2aecf to aa6dfc7 Compare October 25, 2017 17:03
@nlubisch
Copy link
Author

nlubisch commented Oct 25, 2017

Thanks for making it clear to me. I moved my test code to json_decode_error.phpt and removed the second one.

@carusogabriel
Copy link
Contributor

We already have tests for that upstream.

@nlubisch nlubisch deleted the json_decode_depth_error branch February 9, 2019 06:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants