function FeedTest::createEntity
Same name in other branches
- 8.9.x core/modules/jsonapi/tests/src/Functional/FeedTest.php \Drupal\Tests\jsonapi\Functional\FeedTest::createEntity()
Overrides ResourceTestBase::createEntity
File
-
core/
modules/ aggregator/ tests/ src/ Functional/ Jsonapi/ FeedTest.php, line 77
Class
- FeedTest
- JSON:API integration test for the "Feed" content entity type.
Namespace
Drupal\Tests\aggregator\Functional\JsonapiCode
public function createEntity() {
$feed = Feed::create();
$feed->set('fid', 1)
->setTitle('Feed')
->setUrl('http://example.com/rss.xml')
->setDescription('Feed Resource Test 1')
->setRefreshRate(900)
->setLastCheckedTime(123456789)
->setQueuedTime(123456789)
->setWebsiteUrl('http://example.com')
->setImage('http://example.com/feed_logo')
->setHash('abcdefg')
->setEtag('hijklmn')
->setLastModified(123456789)
->save();
return $feed;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.