You are here

protected function UncacheableQueryAccessHandlerTest::setUp in Entity API 8

Overrides EntityKernelTestBase::setUp

File

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

Class

UncacheableQueryAccessHandlerTest
Tests the uncacheable query access handler.

Namespace

Drupal\Tests\entity\Kernel\QueryAccess

Code

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

  // 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_with_owner');
  $this->handler = UncacheableQueryAccessHandler::createInstance($this->container, $entity_type);
}