function ItemTest::createAnotherEntity

Same name and namespace in other branches
  1. 8.9.x core/modules/jsonapi/tests/src/Functional/ItemTest.php \Drupal\Tests\jsonapi\Functional\ItemTest::createAnotherEntity()

Overrides ResourceTestBase::createAnotherEntity

File

core/modules/aggregator/tests/src/Functional/Jsonapi/ItemTest.php, line 94

Class

ItemTest
JSON:API integration test for the "Item" content entity type.

Namespace

Drupal\Tests\aggregator\Functional\Jsonapi

Code

protected function createAnotherEntity($key) {
    $duplicate = $this->getEntityDuplicate($this->entity, $key);
    $duplicate->setLink('https://www.example.org/');
    $duplicate->save();
    return $duplicate;
}

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