[wp-hackers] WordPress 2.0.3 Tuneup Plugin

Sam Angove sam at rephrase.net
Sun Jun 4 09:05:18 GMT 2006


On 6/4/06, Matt Mullenweg <m at mullenweg.com> wrote:
>
> I know there are ways to
> automate browser actions and test that way, but it's a little beyond me.

Had a quick play around with PHP Simple Test[1] and it looks fairly
easy to do with that, though JavaScript would be out of the question.

   http://rephrase.net/miscellany/06/atest.phps

That class contains two tests, one for making a new post, and one
making a new post with the AYS message. The first just sets the title
and content, submits the form, and checks for the "Post saved"
message. The second unsets the nonce[2] so as to always get the "are
you sure?" prompt, submits, checks to see if the AYS has come up, then
submits that and again checks for "Post saved".

They're both fairly useless and brittle, but not difficult to write.
The hard part would be coming up with decent tests to implement. :)


[1]: http://www.lastcraft.com/simple_test.php
[2]: This required modifying SimpleTest, though, since it's been
explicitly designed to prevent changing hidden fields.


More information about the wp-hackers mailing list