Skip to content

Commit

Permalink
Add test for Form::setValidator().
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 4, 2017
1 parent 2e16434 commit 1ee7f4e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/TestCase/Form/FormTest.php
Expand Up @@ -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.
*
Expand Down

0 comments on commit 1ee7f4e

Please sign in to comment.