You are here

public function ImageStyleWarmerGeneralTest::testImageStyleWarmerQueueTemporaryImageFile in Image Style Warmer 8

Test Image Style Warmer queue warming for temporary file.

File

tests/src/Functional/ImageStyleWarmerGeneralTest.php, line 66

Class

ImageStyleWarmerGeneralTest
Functional tests to check general function of Image Style Warmer.

Namespace

Drupal\Tests\image_style_warmer\Functional

Code

public function testImageStyleWarmerQueueTemporaryImageFile() {
  $this
    ->prepareImageStyleWarmerTests();
  $this
    ->assertSame(0, $this->testQueue
    ->numberOfItems(), 'Image Style Warmer Pregenerator queue should be empty.');
  $this
    ->assertFalse(file_exists($this->testInitialStyle
    ->buildUri($this->testFile
    ->getFileUri())), 'Generated file does not exist.');
  $this
    ->assertFalse(file_exists($this->testQueueStyle
    ->buildUri($this->testFile
    ->getFileUri())), 'Generated file does not exist.');
}