function 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.