You are here

public function PaymentMethodBaseTest::providerTestExecutePaymentAccess in Payment 8.2

Provides data to self::testExecutePaymentAccess().

File

tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php, line 269

Class

PaymentMethodBaseTest
@coversDefaultClass \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\Method

Code

public function providerTestExecutePaymentAccess() {
  return [
    [
      TRUE,
      TRUE,
      AccessResult::allowed(),
      AccessResult::allowed(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      TRUE,
      AccessResult::allowed(),
      AccessResult::neutral(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      FALSE,
      AccessResult::allowed(),
      AccessResult::allowed(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      FALSE,
      AccessResult::allowed(),
      AccessResult::neutral(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      TRUE,
      AccessResult::forbidden(),
      AccessResult::allowed(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      TRUE,
      AccessResult::forbidden(),
      AccessResult::neutral(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      TRUE,
      AccessResult::allowed(),
      AccessResult::forbidden(),
      AccessResult::allowed(),
    ],
    [
      FALSE,
      TRUE,
      AccessResult::allowed(),
      AccessResult::allowed(),
      AccessResult::forbidden(),
    ],
    [
      FALSE,
      TRUE,
      AccessResult::allowed(),
      AccessResult::neutral(),
      AccessResult::forbidden(),
    ],
  ];
}