You are here

public function YamlTestBase::providerBoolTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php \Drupal\Tests\Component\Serialization\YamlTestBase::providerBoolTest()
  2. 9 core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php \Drupal\Tests\Component\Serialization\YamlTestBase::providerBoolTest()

Tests different boolean serialization and de-serialization.

1 call to YamlTestBase::providerBoolTest()
YamlTestBase::providerDecodeTests in core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
Some data that should be able to be de-serialized.

File

core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php, line 86

Class

YamlTestBase
Provides standard data to validate different YAML implementations.

Namespace

Drupal\Tests\Component\Serialization

Code

public function providerBoolTest() {
  return [
    [
      'true',
      TRUE,
    ],
    [
      'TRUE',
      TRUE,
    ],
    [
      'True',
      TRUE,
    ],
    [
      'y',
      'y',
    ],
    [
      'Y',
      'Y',
    ],
    [
      'false',
      FALSE,
    ],
    [
      'FALSE',
      FALSE,
    ],
    [
      'False',
      FALSE,
    ],
    [
      'n',
      'n',
    ],
    [
      'N',
      'N',
    ],
  ];
}