You are here

public function CacheableMetadataTest::testCreateFromRenderArray in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php \Drupal\Tests\Core\Cache\CacheableMetadataTest::testCreateFromRenderArray()

@covers ::createFromRenderArray @dataProvider providerTestCreateFromRenderArray

File

core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php, line 145
Contains \Drupal\Tests\Core\Cache\CacheableMetadataTest.

Class

CacheableMetadataTest
@coversDefaultClass \Drupal\Core\Cache\CacheableMetadata @group Cache

Namespace

Drupal\Tests\Core\Cache

Code

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