/**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Give anonymous users permission to access feeds, so that we can verify
     // the cache tags of cached versions of feed items.
     $user_role = Role::load(DRUPAL_ANONYMOUS_RID);
     $user_role->grantPermission('access news feeds');
     $user_role->save();
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Give anonymous users permission to customize shortcut links, so that we
     // can verify the cache tags of cached versions of shortcuts.
     $user_role = Role::load(RoleInterface::ANONYMOUS_ID);
     $user_role->grantPermission('customize shortcut links');
     $user_role->grantPermission('access shortcuts');
     $user_role->save();
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     // Give anonymous users permission to customize shortcut links, so that we
     // can verify the cache tags of cached versions of shortcuts.
     $user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
     $user_role->grantPermission('customize shortcut links');
     $user_role->grantPermission('access shortcuts');
     $user_role->save();
 }