本文整理汇总了PHP中Drupal\Core\Form\FormState::isValidationComplete方法的典型用法代码示例。如果您正苦于以下问题:PHP FormState::isValidationComplete方法的具体用法?PHP FormState::isValidationComplete怎么用?PHP FormState::isValidationComplete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Form\FormState
的用法示例。
在下文中一共展示了FormState::isValidationComplete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testValidationComplete
/**
* Tests the 'validation_complete' $form_state flag.
*
* @covers ::validateForm
* @covers ::finalizeValidation
*/
public function testValidationComplete()
{
$form_validator = $this->getMockBuilder('Drupal\\Core\\Form\\FormValidator')->disableOriginalConstructor()->setMethods(NULL)->getMock();
$form = array();
$form_state = new FormState();
$this->assertFalse($form_state->isValidationComplete());
$form_validator->validateForm('test_form_id', $form, $form_state);
$this->assertTrue($form_state->isValidationComplete());
}
示例2: testValidationComplete
/**
* Tests the 'validation_complete' $form_state flag.
*
* @covers ::validateForm
* @covers ::finalizeValidation
*/
public function testValidationComplete()
{
$form_validator = $this->getMockBuilder('Drupal\\Core\\Form\\FormValidator')->setConstructorArgs([new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler])->setMethods(NULL)->getMock();
$form = array();
$form_state = new FormState();
$this->assertFalse($form_state->isValidationComplete());
$form_validator->validateForm('test_form_id', $form, $form_state);
$this->assertTrue($form_state->isValidationComplete());
}