function ContextTypedDataTest::providerHasContextValue

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php \Drupal\KernelTests\Core\Plugin\ContextTypedDataTest::providerHasContextValue()
  2. 11.x core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php \Drupal\KernelTests\Core\Plugin\ContextTypedDataTest::providerHasContextValue()

Data provider for testHasContextValue.

File

core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php, line 66

Class

ContextTypedDataTest
Tests that contexts work properly with the typed data manager.

Namespace

Drupal\KernelTests\Core\Plugin

Code

public function providerHasContextValue() {
    return [
        [
            TRUE,
            FALSE,
        ],
        [
            TRUE,
            0,
        ],
        [
            TRUE,
            -0,
        ],
        [
            TRUE,
            0.0,
        ],
        [
            TRUE,
            -0.0,
        ],
        [
            TRUE,
            '',
        ],
        [
            TRUE,
            '0',
        ],
        [
            TRUE,
            [],
        ],
        [
            FALSE,
            NULL,
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.