You are here

public function CacheTest::testValidateTags in Zircon Profile 8

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

@covers ::validateTags

@dataProvider validateTagsProvider

File

core/tests/Drupal/Tests/Core/Cache/CacheTest.php, line 53
Contains \Drupal\Tests\Core\Cache\CacheTest.

Class

CacheTest
@coversDefaultClass \Drupal\Core\Cache\Cache @group Cache

Namespace

Drupal\Tests\Core\Cache

Code

public function testValidateTags(array $tags, $expected_exception_message) {
  if ($expected_exception_message !== FALSE) {
    $this
      ->setExpectedException('LogicException', $expected_exception_message);
  }

  // If it doesn't throw an exception, validateTags() returns NULL.
  $this
    ->assertNull(Cache::validateTags($tags));
}