function BubbleableMetadataTest::testCreateFromRenderArray

Tests create from render array.

@legacy-covers ::createFromRenderArray

Attributes

#[DataProvider('providerTestCreateFromRenderArray')]

File

core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php, line 211

Class

BubbleableMetadataTest
Tests Drupal\Core\Render\BubbleableMetadata.

Namespace

Drupal\Tests\Core\Render

Code

public function testCreateFromRenderArray(array $render_array, BubbleableMetadata $expected) : void {
  $this->assertEquals($expected, BubbleableMetadata::createFromRenderArray($render_array));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.