You are here

public function EntityAccessControlHandlerTest::providerTestFieldAccess in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php \Drupal\KernelTests\Core\Entity\EntityAccessControlHandlerTest::providerTestFieldAccess()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php \Drupal\KernelTests\Core\Entity\EntityAccessControlHandlerTest::providerTestFieldAccess()

File

core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php, line 347

Class

EntityAccessControlHandlerTest
Tests the entity access control handler.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function providerTestFieldAccess() {
  return [
    'serial ID entity' => [
      EntityTest::class,
      [
        'name' => 'A test entity',
        'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe',
      ],
      FALSE,
    ],
    'string ID entity' => [
      EntityTestStringId::class,
      [
        'id' => 'a_test_entity',
        'name' => 'A test entity',
        'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe',
      ],
      TRUE,
    ],
  ];
}