You are here

public function EditEntityFieldAccessCheckTest::providerTestAccessForbidden in Zircon Profile 8

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

Provides test data for testAccessForbidden.

File

core/modules/quickedit/tests/src/Unit/Access/EditEntityFieldAccessCheckTest.php, line 115
Contains \Drupal\Tests\quickedit\Unit\Access\EditEntityFieldAccessCheckTest.

Class

EditEntityFieldAccessCheckTest
@coversDefaultClass \Drupal\quickedit\Access\EditEntityFieldAccessCheck @group Access @group quickedit

Namespace

Drupal\Tests\quickedit\Unit\Access

Code

public function providerTestAccessForbidden() {
  $data = array();

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

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

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

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