function testValidate()
 {
     $form = new Form(new Controller(), 'Form', new FieldList(), new FieldList());
     $f = new RecaptchaField('MyField');
     $f->setHTTPClient(new RecaptchaFieldTest_HTTPClient());
     $f->setForm($form);
     $v = new RequiredFields();
     $_REQUEST['recaptcha_challenge_field'] = 'valid';
     $_REQUEST['recaptcha_response_field'] = 'response';
     $this->assertTrue($f->validate($v));
     $_REQUEST['recaptcha_challenge_field'] = 'invalid';
     $_REQUEST['recaptcha_response_field'] = 'response';
     $this->assertFalse($f->validate($v));
     unset($_REQUEST['recaptcha_challenge_field']);
     unset($_REQUEST['recaptcha_response_field']);
 }
 function Form()
 {
     $form = new Form($this, 'Form', new FieldList($f = new RecaptchaField('MyRecaptchaField')), new FieldList(new FormAction('doSubmit', 'submit')));
     $f->setHTTPClient(new RecaptchaFieldTest_HTTPClient());
     return $form;
 }