diff --git a/core/tests/Drupal/Tests/Core/Form/FormAlterTest.php b/core/tests/Drupal/Tests/Core/Form/FormAlterTest.php index 5e61445..05bafdd 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormAlterTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormAlterTest.php @@ -56,7 +56,7 @@ protected function setUp() { */ public function testAlterForm($form_id, $expected_hooks, $form_state_additions = []) { $form = []; - $form_state = new FormState($form_state_additions); + $form_state = (new FormState())->setFormState($form_state_additions); $this->moduleHandler->expects($this->once()) ->method('alter')