protected function EntityResourceTest::createEntityResource in JSON:API 8.2
Creates an instance of the subject under test.
Return value
\Drupal\jsonapi\Controller\EntityResource An EntityResource instance.
4 calls to EntityResourceTest::createEntityResource()
- EntityResourceTest::setUp in tests/
src/ Kernel/ Controller/ EntityResourceTest.php - EntityResourceTest::testGetFilteredCollection in tests/
src/ Kernel/ Controller/ EntityResourceTest.php - @covers ::getCollection
- EntityResourceTest::testGetPagedCollection in tests/
src/ Kernel/ Controller/ EntityResourceTest.php - @covers ::getCollection
- EntityResourceTest::testGetSortedCollection in tests/
src/ Kernel/ Controller/ EntityResourceTest.php - @covers ::getCollection
File
- tests/
src/ Kernel/ Controller/ EntityResourceTest.php, line 189
Class
- EntityResourceTest
- @coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ControllerCode
protected function createEntityResource() {
return new EntityResource($this->container
->get('entity_type.manager'), $this->container
->get('entity_field.manager'), $this->container
->get('jsonapi.resource_type.repository'), $this->container
->get('renderer'), $this->container
->get('entity.repository'), $this->container
->get('jsonapi.include_resolver'), $this->container
->get('jsonapi.entity_access_checker'), $this->container
->get('jsonapi.field_resolver'), $this->container
->get('jsonapi.serializer'), $this->container
->get('datetime.time'), $this->container
->get('current_user'));
}