function ContextDefinitionTest::providerGetConstraint

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

Data provider for testGetConstraint.

File

core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php, line 157

Class

ContextDefinitionTest
Tests the ContextDefinition class.

Namespace

Drupal\Tests\Core\Plugin\Context

Code

public static function providerGetConstraint() {
    return [
        [
            NULL,
            [],
            'nonexistent_constraint_name',
        ],
        [
            'not_null',
            [
                'constraint_name' => 'not_null',
            ],
            'constraint_name',
        ],
    ];
}

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