function EntityContextDefinitionIsSatisfiedTest::providerTestIsSatisfiedByPassBundledEntity

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php \Drupal\Tests\Core\Plugin\Context\EntityContextDefinitionIsSatisfiedTest::providerTestIsSatisfiedByPassBundledEntity()
  2. 10 core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php \Drupal\Tests\Core\Plugin\Context\EntityContextDefinitionIsSatisfiedTest::providerTestIsSatisfiedByPassBundledEntity()
  3. 11.x core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php \Drupal\Tests\Core\Plugin\Context\EntityContextDefinitionIsSatisfiedTest::providerTestIsSatisfiedByPassBundledEntity()

Provides test data for ::testIsSatisfiedByPassBundledEntity().

File

core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php, line 322

Class

EntityContextDefinitionIsSatisfiedTest
@coversDefaultClass \Drupal\Core\Plugin\Context\EntityContextDefinition @group Plugin

Namespace

Drupal\Tests\Core\Plugin\Context

Code

public function providerTestIsSatisfiedByPassBundledEntity() {
    $data = [];
    $data[] = [
        TRUE,
        [],
    ];
    $data[] = [
        FALSE,
        [
            'first_bundle',
        ],
    ];
    $data[] = [
        FALSE,
        [
            'second_bundle',
        ],
    ];
    $data[] = [
        TRUE,
        [
            'third_bundle',
        ],
    ];
    $data[] = [
        TRUE,
        [
            'first_bundle',
            'second_bundle',
            'third_bundle',
        ],
    ];
    $data[] = [
        FALSE,
        [
            'first_bundle',
            'second_bundle',
        ],
    ];
    $data[] = [
        TRUE,
        [
            'first_bundle',
            'third_bundle',
        ],
    ];
    $data[] = [
        TRUE,
        [
            'second_bundle',
            'third_bundle',
        ],
    ];
    return $data;
}

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