You are here

protected function ImageEffectsTestBase::getImageStyleCacheTagInvalidations in Image Effects 8

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/ImageEffectsTestBase.php \Drupal\Tests\image_effects\Functional\ImageEffectsTestBase::getImageStyleCacheTagInvalidations()
  2. 8.2 tests/src/Functional/ImageEffectsTestBase.php \Drupal\Tests\image_effects\Functional\ImageEffectsTestBase::getImageStyleCacheTagInvalidations()

Gets the current cache tag invalidations of an image style.

Parameters

string $image_style_name: The image style name.

Return value

int The invalidations value.

1 call to ImageEffectsTestBase::getImageStyleCacheTagInvalidations()
AspectSwitcherTest::testAspectSwitcherEffect in tests/src/Functional/Effect/AspectSwitcherTest.php
AspectSwitcher effect test.

File

tests/src/Functional/ImageEffectsTestBase.php, line 336

Class

ImageEffectsTestBase
Base test class for image_effects tests.

Namespace

Drupal\Tests\image_effects\Functional

Code

protected function getImageStyleCacheTagInvalidations($image_style_name) {
  $query = Database::getConnection()
    ->select('cachetags', 'a');
  $query
    ->addField('a', 'invalidations');
  $query
    ->condition('tag', 'config:image.style.' . $image_style_name);
  return (int) $query
    ->execute()
    ->fetchColumn();
}