function QuickEditEntityFieldAccessCheckTest::providerTestAccessForbidden

Same name in other branches
  1. 9 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;
}

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