3 namespace Drupal\Tests\Component\Serialization;
5 use PHPUnit\Framework\TestCase;
8 * Provides standard data to validate different YAML implementations.
10 abstract class YamlTestBase extends TestCase {
13 * Some data that should be able to be serialized.
15 public function providerEncodeDecodeTests() {
20 'ponies' => ['nope', 'thanks'],
32 'how_many_times' => 123,
33 'should_i_ask' => FALSE,
45 * Some data that should be able to be de-serialized.
47 public function providerDecodeTests() {
58 version: &jquery_ui 1.10.2
65 'version' => '1.10.2',
67 'jquery.ui.accordion' => [
68 'version' => '1.10.2',
75 foreach ($this->providerBoolTest() as $test) {
76 $data[] = ['bool: ' . $test[0], ['bool' => $test[1]]];
78 $data = array_merge($data, $this->providerBoolTest());
84 * Tests different boolean serialization and de-serialization.
86 public function providerBoolTest() {