diff --git a/tests/TestCase/Form/FormTest.php b/tests/TestCase/Form/FormTest.php index 58b0b1fc3a4..5c49b4f83cf 100644 --- a/tests/TestCase/Form/FormTest.php +++ b/tests/TestCase/Form/FormTest.php @@ -62,6 +62,20 @@ public function testValidator() }); } + /** + * Test setValidator() + * + * @return void + */ + public function testSetValidator() + { + $form = new Form(); + + $validator = $this->getMockBuilder('Cake\Validation\Validator')->getMock(); + $form->setValidator($validator); + $this->assertSame($validator, $form->getValidator()); + } + /** * Test validate method. *