protected function QueryAccessEventTest::setUp in Entity API 8
Overrides EntityKernelTestBase::setUp
File
- tests/
src/ Kernel/ QueryAccess/ QueryAccessEventTest.php, line 33
Class
- QueryAccessEventTest
- Tests the query access event.
Namespace
Drupal\Tests\entity\Kernel\QueryAccessCode
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);
}