For some functions it will be easiest to sidestep socket.io, and just implement the “authenticated” part of the api as get/post requests.
And if that doesn’t work you should probably not be using socket.io and just implement a socket on your own, which is not that difficult either.]]>
Ruby on Rails for example gets around this problem by hashing (SHA512) the session information using a secret key on the server. This way we know that the user id hasn’t been tampered with. (Unless your code has been stolen
Looking at your effort gave me the incentive to go off and write my own version. Although the source is completely different I based the HTML style on yours and gave you credit in the report footer and in the README files.
Instead of using the JSON listener and then deciphering its output, my version inserts a proper HTML printer object which derived from the base PHPUnit framework printer interface.
It also uses the normal ‘runner’ object used by the command line version so that most command line options are available via URL parameters.
Once again to use it you just drop the example ‘index.php’ file into your tests directory and point the browser at it. If the PHPUnit and PHPUnit_Html projects are not in the PHP include path then you need to either add them there or edit the ‘index.php’ file to add the paths to the projects.
It also has the option to view the source code of each test in the report.
You can see a demo of the output generated at https://www.nickturner.co.uk/libs/PHPUnit_Html/demo/.
For more details read the README file at https://github.com/nickturner/PHPUnit_Html/
Thanks for the inspiration and hope you don’t mind me reusing some of your ideas.
If someone could use it: https://github.com/JKrems/yii-report]]>
Thanks for releasing your code! I found your project after searching for a front-end for PHPUnit on StackOverflow. I ended up forking it and making a bunch of modifications – the most notable of which, I think, is the ability to log the unit test results (both visually and with JSON). Check it out here: