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

Custom json_encode breaks Renderer.test.php unit tests for PHP 5.1.3 #2149

Closed
julienmoumne opened this issue Mar 5, 2011 · 5 comments
Closed
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@julienmoumne
Copy link
Member

Renderer.test.php test_JSON_test1(), Renderer.test.php test_JSON_Array_test1() and test_JSON_Array_isMadeOfArray_test1() expects

©

to be encoded as

\u00a9

json_encode() custom function does not encode HTML entities into unicode entities. It returns the associated UTF-8 character.

What should we do from here :

  • Improve the function or,
  • Consider the tests correct or,
  • Stop maintaining PHP versions lacking json.
@robocoder
Copy link
Contributor

or modify test to expect either result (assuming the \u codes are correct)

Aren't there also some tests in tests/integration that fail?

@julienmoumne
Copy link
Member Author

Concerning integration tests

On Windows 7x64, PHP 5.1.3 (mod), Apache 2.0, MySQL 5.5x64 - I have 201 passes, 143 fails and 0 exceptions (Test Results).

On Windows 7x64, PHP 5.3.5 (mod), Apache 2.2, MySQL 5.5x64 - I have 214 passes, 130 fails and 0 exceptions. (Test Results).

On Windows XP, PHP 5.3.5 (mod), Apache 2.2, MySQL 5.5 - I have 214 passes, 130 fails and 0 exceptions. (Test Results).

I'm currently trying to understand what's happening. When I'll have investigated integration tests on PHP 5.3.5 I'll be more able to investigate the impact of json_encode on integration tests with PHP 5.1.3.

@mattab
Copy link
Member

mattab commented Mar 5, 2011

It's rated as a PHP bug in 5.1.3 which is OK, users should be using more recent versions anyway, since many critical bugs in these old builds

@julienmoumne
Copy link
Member Author

In that case we need to define which minimum version of PHP developers should work on.

@julienmoumne
Copy link
Member Author

Concerning /ticket/2149#comment:2, the root of all the failing tests is /ticket/2153

@julienmoumne julienmoumne added this to the 1.x - Piwik 1.x milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants