You are here

function ImageAdminStylesTest::getImageCount in Zircon Profile 8

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

Count the number of images currently create for a style.

3 calls to ImageAdminStylesTest::getImageCount()
ImageAdminStylesTest::testConfigImport in core/modules/image/src/Tests/ImageAdminStylesTest.php
Tests image style configuration import that does a delete.
ImageAdminStylesTest::testFlushUserInterface in core/modules/image/src/Tests/ImageAdminStylesTest.php
Test flush user interface.
ImageAdminStylesTest::testStyle in core/modules/image/src/Tests/ImageAdminStylesTest.php
General test to add a style, add/remove/edit effects to it, then delete it.

File

core/modules/image/src/Tests/ImageAdminStylesTest.php, line 43
Contains \Drupal\image\Tests\ImageAdminStylesTest.

Class

ImageAdminStylesTest
Tests creation, deletion, and editing of image styles and effects.

Namespace

Drupal\image\Tests

Code

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