protected function UserCacheTagsTest::createEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/tests/src/Functional/UserCacheTagsTest.php \Drupal\Tests\user\Functional\UserCacheTagsTest::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityCacheTagsTestBase::createEntity
File
- core/
modules/ user/ tests/ src/ Functional/ UserCacheTagsTest.php, line 43
Class
- UserCacheTagsTest
- Tests the User entity's cache tags.
Namespace
Drupal\Tests\user\FunctionalCode
protected function createEntity() {
// Create a "Llama" user.
$user = User::create([
'name' => 'Llama',
'status' => TRUE,
]);
$user
->save();
return $user;
}