You are here

protected function QueryAccessHandlerTest::setUp in Entity API 8

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/QueryAccess/QueryAccessHandlerTest.php, line 40

Class

QueryAccessHandlerTest
Tests the query access handler.

Namespace

Drupal\Tests\entity\Kernel\QueryAccess

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test_enhanced');

  // Create uid: 1 here so that it's skipped in test cases.
  $admin_user = $this
    ->createUser();
  $entity_type_manager = $this->container
    ->get('entity_type.manager');
  $entity_type = $entity_type_manager
    ->getDefinition('entity_test_enhanced');
  $this->handler = QueryAccessHandler::createInstance($this->container, $entity_type);
}