function ImageStyleFlushTest::getImageCount

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

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

File

drupal/core/modules/image/lib/Drupal/image/Tests/ImageStyleFlushTest.php, line 46
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(), '/.*/'));
}