HTMLPurifier 1.0.0beta released!
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Actually thinking about unit testing this would be great testing resource. I've just got myself a copy of "Test-Driven Development" by Kent Beck and started reading it today. Obviously the whole principle of TDD is to write tests before the code you are testing. This can be problem if you are testing code that will generate HTML.
HTML isn't easy to test in any flexible way. If you could run it through HTMLPurifier and have it tell you how many purifications it made that would be a start. Being about to browse the HTML like a document tree and check values inside would be good too, I guess I could use XMLDom for that though.
HTML isn't easy to test in any flexible way. If you could run it through HTMLPurifier and have it tell you how many purifications it made that would be a start. Being about to browse the HTML like a document tree and check values inside would be good too, I guess I could use XMLDom for that though.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Component wise, yes. Check out the tests/ folder. Or check this out. (edit: Rawr, the unit tests are broken. How the heck did that happen? Apache's refusing to boot too on my computer... will investigate).AC has this been thoroughly unit tested?
That's an interesting new feature, and we'd probably want that. However, regarding the overarching scheme of things, HTML in and HTML out, I think we're better off having more informal smoketests to ensure that the output is sane.HTML isn't easy to test in any flexible way. If you could run it through HTMLPurifier and have it tell you how many purifications it made that would be a start. Being about to browse the HTML like a document tree and check values inside would be good too, I guess I could use XMLDom for that though.
Well, it seems now phpDoc does. I'll check phpxref too. However, my primary complaint with phpDoc still stands: it takes too long!Last time I checked phpDoc didn't do that. There was a standalone application, phpxref though
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
An informal, human-run test. Because some things can't be unit tested. For everything else, there's SimpleTest.
Here's some examples: http://hp.jpsband.org/live/smoketests
Edit - Feyd is fast!
Here's some examples: http://hp.jpsband.org/live/smoketests
Edit - Feyd is fast!
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US