You are here

public function CacheableMetadataTest::providerSetCacheMaxAge in Zircon Profile 8

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

Data provider for testSetCacheMaxAge.

File

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

Class

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

Namespace

Drupal\Tests\Core\Cache

Code

public function providerSetCacheMaxAge() {
  return [
    [
      0,
      FALSE,
    ],
    [
      'http',
      TRUE,
    ],
    [
      '0',
      TRUE,
    ],
    [
      new \stdClass(),
      TRUE,
    ],
    [
      300,
      FALSE,
    ],
    [
      [],
      TRUE,
    ],
    [
      8.0,
      TRUE,
    ],
  ];
}