3 namespace Drupal\Tests\aggregator\Functional;
5 use Drupal\aggregator\Entity\Feed;
6 use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
7 use Drupal\user\Entity\Role;
8 use Drupal\user\RoleInterface;
11 * Tests the Feed entity's cache tags.
15 class FeedCacheTagsTest extends EntityWithUriCacheTagsTestBase {
20 public static $modules = ['aggregator'];
25 protected function setUp() {
28 // Give anonymous users permission to access feeds, so that we can verify
29 // the cache tags of cached versions of feeds.
30 $user_role = Role::load(RoleInterface::ANONYMOUS_ID);
31 $user_role->grantPermission('access news feeds');
38 protected function createEntity() {
39 // Create a "Llama" feed.
40 $feed = Feed::create([
42 'url' => 'https://www.drupal.org/',
44 'checked' => 1389919932,
45 'description' => 'Drupal.org',