silverstripe/sapphire — pull request #357 by halkyon (2012-04-20 02:00:07+00:00)
Title: Fixing broken tests relying on outdated simpletest, removing the dependency on simpletest for TestSession::submitForm()

This fixes broken tests, as simpletest can't handle `` elements, probably because it's outdated.

Which brings me to a point, there's not many tests that are actually using simpletest, so we don't really need it. This pull request makes `TestSession::submitForm()` work without it, so instead it gets the FormID from the `lastResponse` body, and then finds the action attribute in the form to use with `post()` instead.

I've also fixed core tests to use good old `post()` instead, but `submitForm()` remains as a shortcut if anyone still uses it.