You are here

public function QuickEditEntityFieldAccessCheckTest::providerTestAccessForbidden in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/quickedit/tests/src/Unit/Access/QuickEditEntityFieldAccessCheckTest.php \Drupal\Tests\quickedit\Unit\Access\QuickEditEntityFieldAccessCheckTest::providerTestAccessForbidden()

Provides test data for testAccessForbidden.

File

core/modules/quickedit/tests/src/Unit/Access/QuickEditEntityFieldAccessCheckTest.php, line 110

Class

QuickEditEntityFieldAccessCheckTest
@coversDefaultClass \Drupal\quickedit\Access\QuickEditEntityFieldAccessCheck @group Access @group quickedit

Namespace

Drupal\Tests\quickedit\Unit\Access

Code

public function providerTestAccessForbidden() {
  $data = [];

  // Tests the access method without a field_name.
  $data[] = [
    NULL,
    LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ];

  // Tests the access method with a non-existent field.
  $data[] = [
    'not_valid',
    LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ];

  // Tests the access method without a langcode.
  $data[] = [
    'valid',
    NULL,
  ];

  // Tests the access method with an invalid langcode.
  $data[] = [
    'valid',
    'xx-lolspeak',
  ];
  return $data;
}