function FormBuilderTest::testFormCacheDeletionUncached
Tests that an uncached form does not trigger cache set or delete.
File
- 
              core/tests/ Drupal/ Tests/ Core/ Form/ FormBuilderTest.php, line 561 
Class
- FormBuilderTest
- @coversDefaultClass \Drupal\Core\Form\FormBuilder[[api-linebreak]] @group Form
Namespace
Drupal\Tests\Core\FormCode
public function testFormCacheDeletionUncached() {
  $form_id = 'test_form_id';
  $form_build_id = $this->randomMachineName();
  $expected_form = $form_id();
  $expected_form['#build_id'] = $form_build_id;
  $form_arg = $this->getMockForm($form_id, $expected_form);
  $this->formCache
    ->expects($this->never())
    ->method('deleteCache');
  $form_state = new FormState();
  $this->simulateFormSubmission($form_id, $form_arg, $form_state);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
