You are here

protected function UserCacheTagsTest::createEntity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Tests/UserCacheTagsTest.php \Drupal\user\Tests\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/src/Tests/UserCacheTagsTest.php, line 42
Contains \Drupal\user\Tests\UserCacheTagsTest.

Class

UserCacheTagsTest
Tests the User entity's cache tags.

Namespace

Drupal\user\Tests

Code

protected function createEntity() {

  // Create a "Llama" user.
  $user = entity_create('user', array(
    'name' => 'Llama',
    'status' => TRUE,
  ));
  $user
    ->save();
  return $user;
}