I have a form in the UI which I would like to submit from my unit test programmatically (i.e. not with a
UiHelperTrait method) from the test. The
drupalPostForm solution would be quite straightforward:
$this->drupalPostForm('/url/of/the/form', [ 'entity' => $value, ], 'Save');
But I am wondering if there is a way to achieve submitting the form with the
save(array $form, FormStateInterface $form_state) method? How would I be able to retrieve the
$form and the
$form_state values in the test class?