function FormStateValuesTraitTest::providerIsValueEmpty
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php \Drupal\Tests\Core\Form\FormStateValuesTraitTest::providerIsValueEmpty()
- 10 core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php \Drupal\Tests\Core\Form\FormStateValuesTraitTest::providerIsValueEmpty()
- 11.x core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php \Drupal\Tests\Core\Form\FormStateValuesTraitTest::providerIsValueEmpty()
Provides data to self::testIsValueEmpty().
Return value
array[] Items are arrays of two items:
- The key to check for in the form state (string)
- Whether the value is empty or not (bool).
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormStateValuesTraitTest.php, line 220
Class
- FormStateValuesTraitTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Form%21FormStateValuesTrait.php/trait/FormStateValuesTrait/9" title="Provides methods to manage form state values." class="local">\Drupal\Core\Form\FormStateValuesTrait</a>
Namespace
Drupal\Tests\Core\FormCode
public function providerIsValueEmpty() {
$data = [];
$data[] = [
'foo',
FALSE,
];
$data[] = [
[
'bar',
'baz',
],
FALSE,
];
$data[] = [
[
'foo',
'bar',
'baz',
],
TRUE,
];
$data[] = [
'true',
FALSE,
];
$data[] = [
'false',
TRUE,
];
$data[] = [
'null',
TRUE,
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.