Unverified Commit 39b12c46 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3264122 by Spokje, Taran2L, ankithashetty, quietone, catch, xjm,...

Issue #3264122 by Spokje, Taran2L, ankithashetty, quietone, catch, xjm, daffie: Move all non migration aggregator tests to the module in preparation of removal in d10
parent 19eaa3ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
 * Plugin Namespace: Plugin\QueueWorker
 *
 * For a working example, see
 * \Drupal\aggregator\Plugin\QueueWorker\AggregatorRefresh.
 * \Drupal\locale\Plugin\QueueWorker\LocaleTranslation.
 *
 * @see \Drupal\Core\Queue\QueueWorkerInterface
 * @see \Drupal\Core\Queue\QueueWorkerBase
+13 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@
 * Used to aggregate syndicated content (RSS, RDF, and Atom).
 */

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\aggregator\Entity\Feed;
use Drupal\Core\Routing\RouteMatchInterface;
@@ -205,3 +208,13 @@ function aggregator_preprocess_block(&$variables) {
    $variables['attributes']['role'] = 'complementary';
  }
}

/**
 * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'aggregator_feed'.
 */
function aggregator_jsonapi_aggregator_feed_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) {
  // @see \Drupal\aggregator\FeedAccessControlHandler::checkAccess()
  return ([
    JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access news feeds'),
  ]);
}
+2 −2
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@ status: true
dependencies:
  module:
    - aggregator
id: test_style_opml
label: test_style_opml
id: test_aggregator_style_opml
label: test_aggregator_style_opml
module: views
description: ''
tag: default
+3 −2
Original line number Diff line number Diff line
<?php

namespace Drupal\Tests\jsonapi\Functional;
namespace Drupal\Tests\aggregator\Functional\Jsonapi;

use Drupal\aggregator\Entity\Feed;
use Drupal\Core\Url;
use Drupal\Tests\jsonapi\Functional\ResourceTestBase;
use Drupal\Tests\jsonapi\Traits\CommonCollectionFilterAccessTestPatternsTrait;

/**
 * JSON:API integration test for the "Feed" content entity type.
 *
 * @group jsonapi
 * @group aggregator
 */
class FeedTest extends ResourceTestBase {

+3 −2
Original line number Diff line number Diff line
<?php

namespace Drupal\Tests\jsonapi\Functional;
namespace Drupal\Tests\aggregator\Functional\Jsonapi;

use Drupal\aggregator\Entity\Feed;
use Drupal\aggregator\Entity\Item;
use Drupal\Tests\jsonapi\Functional\ResourceTestBase;

/**
 * JSON:API integration test for the "Item" content entity type.
 *
 * @group jsonapi
 * @group aggregator
 */
class ItemTest extends ResourceTestBase {

Loading