AR integration tests for form helpers

As suggested in #8623, I'm adding AR integration tests for form helpers. This will ensure they won't break if the AR interface is updated later.
Please review the code. If it's alright, I'll add a few more tests and fixes to the pull request.