Issue #2388349 by almaudoh: FormState::cleanValues() doesn't conform with the FormStateInterface documentation
parent
e219cb9521
commit
89e6ec9ffd
|
@ -1241,6 +1241,7 @@ class FormState implements FormStateInterface {
|
|||
unset($values[$last_parent]);
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -565,8 +565,7 @@ class FormStateTest extends UnitTestCase {
|
|||
*/
|
||||
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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue