function FeedCacheTagsTest::createEntity

Creates the entity to be tested.

Return value

\Drupal\Core\Entity\EntityInterface The entity to be tested.

Overrides EntityCacheTagsTestBase::createEntity

File

core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php, line 44

Class

FeedCacheTagsTest
Tests the Feed entity's cache tags.

Namespace

Drupal\Tests\aggregator\Functional

Code

protected function createEntity() {
  // Create a "Llama" feed.
  $feed = Feed::create([
    'title' => 'Llama',
    'url' => 'https://www.drupal.org/',
    'refresh' => 900,
    'checked' => 1389919932,
    'description' => 'Drupal.org',
  ]);
  $feed->save();
  return $feed;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.