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

8.0.x
Alex Pott 2015-03-21 12:56:40 +00:00
parent e219cb9521
commit 89e6ec9ffd
2 changed files with 2 additions and 2 deletions

View File

@ -1241,6 +1241,7 @@ class FormState implements FormStateInterface {
unset($values[$last_parent]);
}
}
return $this;
}
/**

View File

@ -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']);
}
}