function BubbleableMetadataTest::providerTestMergeAttachmentsHtmlHeadLinkMerging
Data provider for testMergeAttachmentsHtmlHeadLinkMerging.
Return value
array
File
- 
              core/tests/ Drupal/ Tests/ Core/ Render/ BubbleableMetadataTest.php, line 472 
Class
- BubbleableMetadataTest
- @coversDefaultClass \Drupal\Core\Render\BubbleableMetadata[[api-linebreak]] @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function providerTestMergeAttachmentsHtmlHeadLinkMerging() {
  $rel = [
    'rel' => 'rel',
    'href' => 'http://rel.example.com',
  ];
  $shortlink = [
    'rel' => 'shortlink',
    'href' => 'http://shortlink.example.com',
  ];
  $a = [
    'html_head_link' => [
      $rel,
      TRUE,
    ],
  ];
  $b = [
    'html_head_link' => [
      $shortlink,
      FALSE,
    ],
  ];
  $expected_a = [
    'html_head_link' => [
      $rel,
      TRUE,
      $shortlink,
      FALSE,
    ],
  ];
  // Merging in the opposite direction yields the opposite library order.
  $expected_b = [
    'html_head_link' => [
      $shortlink,
      FALSE,
      $rel,
      TRUE,
    ],
  ];
  return [
    [
      $a,
      $b,
      $expected_a,
    ],
    [
      $b,
      $a,
      $expected_b,
    ],
  ];
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
