function ContextTest::providerHasContextValue

Same name and namespace in other branches
  1. 9 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 85

Class

ContextTest
@coversDefaultClass \Drupal\Component\Plugin\Context\Context[[api-linebreak]] @group Plugin

Namespace

Drupal\Tests\Component\Plugin\Context

Code

public static 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.