public function YamlTestBase::providerEncodeDecodeTests in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php \Drupal\Tests\Component\Serialization\YamlTestBase::providerEncodeDecodeTests()
- 9 core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php \Drupal\Tests\Component\Serialization\YamlTestBase::providerEncodeDecodeTests()
Some data that should be able to be serialized.
File
- core/
tests/ Drupal/ Tests/ Component/ Serialization/ YamlTestBase.php, line 15
Class
- YamlTestBase
- Provides standard data to validate different YAML implementations.
Namespace
Drupal\Tests\Component\SerializationCode
public function providerEncodeDecodeTests() {
return [
[
'foo' => 'bar',
'id' => 'schnitzel',
'ponies' => [
'nope',
'thanks',
],
'how' => [
'about' => 'if',
'i' => 'ask',
'nicely',
],
'the' => [
'answer' => [
'still' => 'would',
'be' => 'Y',
],
],
'how_many_times' => 123,
'should_i_ask' => FALSE,
1,
FALSE,
[
1,
FALSE,
],
[
10,
],
[
0 => '123456',
],
],
[
NULL,
],
];
}