function ContextTest::providerHasContextValue

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerHasContextValue()
  2. 10 core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerHasContextValue()
  3. 9 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 92

Class

ContextTest
Tests Drupal\Component\Plugin\Context\Context.

Namespace

Drupal\Tests\Component\Plugin\Context

Code

public static function providerHasContextValue() : array {
  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.