You are here

public function OwnOrAdminConstraintValidatorTest::validateProvider in Simple OAuth (OAuth2) & OpenID Connect 8

File

tests/src/Unit/Plugin/Validation/Constraint/OwnOrAdminConstraintValidatorTest.php, line 43

Class

OwnOrAdminConstraintValidatorTest
Class OwnOrAdminConstraintValidatorTest.

Namespace

Drupal\Tests\simple_oauth\Unit\Plugin\Validation\Constraint

Code

public function validateProvider() {
  return [
    // 1. Success: same user id.
    [
      6,
      TRUE,
      TRUE,
    ],
    // 2. Success: different user ID but has permission.
    [
      2,
      TRUE,
      TRUE,
    ],
    // 3. Fail.
    [
      2,
      FALSE,
      FALSE,
    ],
  ];
}