function FieldResolverTest::makeBundle

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::makeBundle()
  2. 8.9.x core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::makeBundle()
  3. 11.x core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::makeBundle()

Create a simple bundle.

Parameters

string $name: The name of the bundle to create.

1 call to FieldResolverTest::makeBundle()
FieldResolverTest::setUp in core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php

File

core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php, line 357

Class

FieldResolverTest
@coversDefaultClass \Drupal\jsonapi\Context\FieldResolver @group jsonapi @group #slow

Namespace

Drupal\Tests\jsonapi\Kernel\Context

Code

protected function makeBundle($name) {
    EntityTestBundle::create([
        'id' => $name,
    ])->save();
}

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