You are here

function ImageStyleFlushTest::getImageCount in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/image/src/Tests/ImageStyleFlushTest.php \Drupal\image\Tests\ImageStyleFlushTest::getImageCount()

Count the number of images currently created for a style in a wrapper.

1 call to ImageStyleFlushTest::getImageCount()
ImageStyleFlushTest::testFlush in core/modules/image/src/Tests/ImageStyleFlushTest.php
General test to flush a style.

File

core/modules/image/src/Tests/ImageStyleFlushTest.php, line 42
Contains \Drupal\image\Tests\ImageStyleFlushTest.

Class

ImageStyleFlushTest
Tests flushing of image styles.

Namespace

Drupal\image\Tests

Code

function getImageCount($style, $wrapper) {
  return count(file_scan_directory($wrapper . '://styles/' . $style
    ->id(), '/.*/'));
}