You are here

public function BubbleableMetadataTest::providerTestMergeAttachmentsFeedMerging in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php \Drupal\Tests\Core\Render\BubbleableMetadataTest::providerTestMergeAttachmentsFeedMerging()

Data provider for testMergeAttachmentsFeedMerging

Return value

array

File

core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php, line 409
Contains \Drupal\Tests\Core\Render\BubbleableMetadataTest.

Class

BubbleableMetadataTest
@coversDefaultClass \Drupal\Core\Render\BubbleableMetadata @group Render

Namespace

Drupal\Tests\Core\Render

Code

public function providerTestMergeAttachmentsFeedMerging() {
  $feed_a = [
    'aggregator/rss',
    'Feed title',
  ];
  $feed_b = [
    'taxonomy/term/1/feed',
    'RSS - foo',
  ];
  $a = [
    'feed' => [
      $feed_a,
    ],
  ];
  $b = [
    'feed' => [
      $feed_b,
    ],
  ];
  $expected_a = [
    'feed' => [
      $feed_a,
      $feed_b,
    ],
  ];

  // Merging in the opposite direction yields the opposite library order.
  $expected_b = [
    'feed' => [
      $feed_b,
      $feed_a,
    ],
  ];
  return [
    [
      $a,
      $b,
      $expected_a,
    ],
    [
      $b,
      $a,
      $expected_b,
    ],
  ];
}