|
|
@@ -19,6 +19,7 @@ use Cake\TestSuite\TestCase;
|
|
|
use Cake\Validation\Validator;
|
|
|
use TestApp\Form\AppForm;
|
|
|
use TestApp\Form\FormSchema;
|
|
|
+use TestApp\Form\ValidateForm;
|
|
|
|
|
|
/**
|
|
|
* Form test case.
|
|
|
@@ -126,6 +127,16 @@ class FormTest extends TestCase
|
|
|
$this->assertCount(0, $form->errors());
|
|
|
}
|
|
|
|
|
|
+ public function testValidateDeprected()
|
|
|
+ {
|
|
|
+ $this->deprecated(function() {
|
|
|
+ $form = new ValidateForm();
|
|
|
+ $data = [];
|
|
|
+ $this->assertFalse($form->validate($data));
|
|
|
+ $this->assertCount(1, $form->errors());
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Test the errors methods.
|
|
|
*
|