$this->
assertSame($form_state->
getCleanValueKeys(),
['form_id', 'form_token', 'form_build_id', 'op', 'value_to_clean'
]);
return $form_state;
} /**
* @depends testAddCleanValueKey
*
* @covers ::cleanValues
*/
public function testCleanValues($form_state) { $form_state->
setValue('value_to_keep', 'magic_ponies'
);
$this->
assertSame($form_state->
cleanValues()->
getValues(),
['value_to_keep' => 'magic_ponies'
]);
} /**
* @covers ::setValues
* @covers ::getValues
*/
public function testGetValues() { $values =
[ 'foo' => 'bar',
];
$form_state =
new FormState();