public function testSubmitDefaultValue()
 {
     $result = $this->forms->createRequest('defaultDate', ['date' => '27.07.2015 14:00']);
     $form = $result->getForm();
     $this->assertTrue($form->isSubmitted());
     $this->assertTrue($form->hasErrors());
     $this->assertSame(sprintf('Date is not in expected format (example of correct date: %s).', date('Y-m-d H:i', time())), $form->errors[0]);
 }
 public function testRequired()
 {
     $result = $this->forms->createRequest('required');
     $form = $result->getForm();
     $this->assertTrue($form->isSubmitted());
     $this->assertTrue($form->hasErrors());
 }
 public function testSubmitWithoutKeys()
 {
     $this->assertThrowException(function () {
         $this->forms->createRequest('withoutKeys', ['g-recaptcha-response' => '48sf8sagd48gas48as84asf']);
     }, 'WebChemistry\\Forms\\ControlException');
 }