function ContextTest::providerGetContextValue

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerGetContextValue()
  2. 8.9.x core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerGetContextValue()
  3. 10 core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php \Drupal\Tests\Component\Plugin\Context\ContextTest::providerGetContextValue()

Data provider for testGetContextValue.

File

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

Class

ContextTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Plugin%21Context%21Context.php/class/Context/11.x" title="A generic context class for wrapping data a plugin needs to operate." class="local">\Drupal\Component\Plugin\Context\Context</a> @group Plugin

Namespace

Drupal\Tests\Component\Plugin\Context

Code

public static function providerGetContextValue() {
    return [
        [
            'context_value',
            'context_value',
            FALSE,
            'data_type',
        ],
        [
            NULL,
            NULL,
            FALSE,
            'data_type',
        ],
        [
            'will throw exception',
            NULL,
            TRUE,
            'data_type',
        ],
    ];
}

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