protected function FeedCacheTagsTest::createEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php \Drupal\Tests\aggregator\Functional\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 43
Class
- FeedCacheTagsTest
- Tests the Feed entity's cache tags.
Namespace
Drupal\Tests\aggregator\FunctionalCode
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;
}