Commit 89e6ec9f authored by alexpott's avatar alexpott

Issue #2388349 by almaudoh: FormState::cleanValues() doesn't conform with the...

Issue #2388349 by almaudoh: FormState::cleanValues() doesn't conform with the FormStateInterface documentation
parent e219cb95
......@@ -1241,6 +1241,7 @@ public function cleanValues() {
unset($values[$last_parent]);
}
}
return $this;
}
/**
......
......@@ -565,8 +565,7 @@ public function testAddCleanValueKey() {
*/
public function testCleanValues($form_state) {
$form_state->setValue('value_to_keep', 'magic_ponies');
$form_state->cleanValues();
$this->assertSame($form_state->getValues(), ['value_to_keep' => 'magic_ponies']);
$this->assertSame($form_state->cleanValues()->getValues(), ['value_to_keep' => 'magic_ponies']);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment