Page 2 of 2

Posted: Fri Aug 18, 2006 9:13 pm
by Ambush Commander
So... is anyone using it? Comments? Gripes? Anyone discover the latent configuration system that as of right now is totally undocumented?

Posted: Fri Aug 18, 2006 11:30 pm
by Weirdan
which I don't think phpDoc does but I might be mistaken
Last time I checked phpDoc didn't do that. There was a standalone application, phpxref though

Posted: Sat Aug 19, 2006 7:16 am
by Ollie Saunders
AC has this been thoroughly unit tested?

Posted: Sat Aug 19, 2006 9:02 am
by Ollie Saunders
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.

Posted: Sat Aug 19, 2006 10:23 am
by Ambush Commander
AC has this been thoroughly unit tested?
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).
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.
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.
Last time I checked phpDoc didn't do that. There was a standalone application, phpxref though
Well, it seems now phpDoc does. I'll check phpxref too. However, my primary complaint with phpDoc still stands: it takes too long! :-)

Posted: Sat Aug 19, 2006 11:20 am
by Ollie Saunders
I think we're better off having more informal smoketests to ensure that the output is sane.
What is a smoketest?

Posted: Sat Aug 19, 2006 11:22 am
by feyd
ole wrote:What is a smoketest?
Visual check test performed by a human during tests.

Posted: Sat Aug 19, 2006 11:22 am
by Ambush Commander
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! :-)

Posted: Sat Aug 19, 2006 12:44 pm
by Nathaniel
Wow man. It's so simple to use. Just create a new instance and run the purify method. Amazing.

I definitely have some uses for this.

Posted: Sat Aug 19, 2006 12:53 pm
by Ambush Commander
Just make sure you're output in XHTML Transitional and UTF-8. While it probably would be fairly difficult to do, there could be some XSS vectors if that's not specified properly.

I could have made the interface even simpler, to be honest. purify_html() function.

Glad to hear you like it!