function UserCacheTagsTest::createEntity
Same name and namespace in other branches
- 8.9.x core/modules/user/tests/src/Functional/UserCacheTagsTest.php \Drupal\Tests\user\Functional\UserCacheTagsTest::createEntity()
- 10 core/modules/user/tests/src/Functional/UserCacheTagsTest.php \Drupal\Tests\user\Functional\UserCacheTagsTest::createEntity()
- 11.x core/modules/user/tests/src/Functional/UserCacheTagsTest.php \Drupal\Tests\user\Functional\UserCacheTagsTest::createEntity()
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.