protected function FileTest::createAnotherEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/FileTest.php \Drupal\Tests\jsonapi\Functional\FileTest::createAnotherEntity()
- 9 core/modules/jsonapi/tests/src/Functional/FileTest.php \Drupal\Tests\jsonapi\Functional\FileTest::createAnotherEntity()
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ FileTest.php, line 120
Class
- FileTest
- JSON:API integration test for the "File" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function createAnotherEntity($key) {
/** @var \Drupal\file\FileInterface $duplicate */
$duplicate = parent::createAnotherEntity($key);
$duplicate
->setFileUri("public://{$key}.txt");
$duplicate
->save();
return $duplicate;
}