function ConditionAccessResolverTraitTest::providerTestResolveConditions

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php \Drupal\Tests\Core\Condition\ConditionAccessResolverTraitTest::providerTestResolveConditions()
  2. 8.9.x core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php \Drupal\Tests\Core\Condition\ConditionAccessResolverTraitTest::providerTestResolveConditions()
  3. 11.x core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php \Drupal\Tests\Core\Condition\ConditionAccessResolverTraitTest::providerTestResolveConditions()

File

core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php, line 53

Class

ConditionAccessResolverTraitTest
@coversDefaultClass \Drupal\Core\Condition\ConditionAccessResolverTrait @group Condition

Namespace

Drupal\Tests\Core\Condition

Code

public static function providerTestResolveConditions() {
    (yield [
        [],
        'and',
        TRUE,
    ]);
    (yield [
        [],
        'or',
        FALSE,
    ]);
    (yield [
        [
            'false',
        ],
        'or',
        FALSE,
    ]);
    (yield [
        [
            'false',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'true',
        ],
        'or',
        TRUE,
    ]);
    (yield [
        [
            'true',
        ],
        'and',
        TRUE,
    ]);
    (yield [
        [
            'true',
            'false',
        ],
        'or',
        TRUE,
    ]);
    (yield [
        [
            'true',
            'false',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'exception',
        ],
        'or',
        FALSE,
    ]);
    (yield [
        [
            'exception',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'true',
            'exception',
        ],
        'or',
        TRUE,
    ]);
    (yield [
        [
            'true',
            'exception',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'exception',
            'true',
        ],
        'or',
        TRUE,
    ]);
    (yield [
        [
            'exception',
            'true',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'false',
            'exception',
        ],
        'or',
        FALSE,
    ]);
    (yield [
        [
            'false',
            'exception',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'exception',
            'false',
        ],
        'or',
        FALSE,
    ]);
    (yield [
        [
            'exception',
            'false',
        ],
        'and',
        FALSE,
    ]);
    (yield [
        [
            'negated',
        ],
        'or',
        TRUE,
    ]);
    (yield [
        [
            'negated',
        ],
        'and',
        TRUE,
    ]);
    (yield [
        [
            'negated',
            'negated',
        ],
        'or',
        TRUE,
    ]);
    (yield [
        [
            'negated',
            'negated',
        ],
        'and',
        TRUE,
    ]);
}

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