function ContextTest::providerHasContextValue

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerHasContextValue()
  2. 11.x core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerHasContextValue()

Data provider for testHasContextValue.

File

core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php, line 86

Class

ContextTest
@coversDefaultClass \Drupal\Component\Plugin\Context\Context @group Plugin

Namespace

Drupal\Tests\Component\Plugin\Context

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.