Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks when outputting (echo, print_r, var_dump etc) JSON from within test #9

Closed
motin opened this issue Jun 4, 2011 · 2 comments
Closed

Comments

@motin
Copy link

motin commented Jun 4, 2011

Writing some tests against some web services. The ui breaks when attempting to output the response from these web services from within the tests. Tracked this down to the fact that the response is in JSON format, and that the _pull() method blindly pulls anything within curly braces as a test result element...

Easiest way to reproduce is the put the following in any test:

            echo "foo {breaks: this} bar";
@ghost ghost self-assigned this Jun 4, 2011
@motin
Copy link
Author

motin commented Jun 4, 2011

Here is the workaround patch that solves the issue enough for me: https://gist.github.com/1008206

@motin
Copy link
Author

motin commented Jun 4, 2011

Had to fix it even more. Now it takes nesting level into account and makes sure that only json blocks starting with event-items are getting pulled: https://gist.github.com/1008206

@ghost ghost closed this as completed in 8dbc7d4 Jun 4, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant