function EntityResourceTest::createEntityResource

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php \Drupal\Tests\jsonapi\Kernel\Controller\EntityResourceTest::createEntityResource()
  2. 10 core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php \Drupal\Tests\jsonapi\Kernel\Controller\EntityResourceTest::createEntityResource()
  3. 11.x core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php \Drupal\Tests\jsonapi\Kernel\Controller\EntityResourceTest::createEntityResource()

Creates an instance of the subject under test.

Return value

\Drupal\jsonapi\Controller\EntityResource An EntityResource instance.

2 calls to EntityResourceTest::createEntityResource()
EntityResourceTest::setUp in core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
EntityResourceTest::testGetPagedCollection in core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
@covers ::getCollection

File

core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php, line 179

Class

EntityResourceTest
@coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\Controller

Code

protected function createEntityResource() {
    return $this->container
        ->get('jsonapi.entity_resource');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.