public function ImageStyleWarmerDrushTest::testDrushWarmUp in Image Style Warmer 8
Tests Image Style Warmer warm-up via Drush command.
File
- tests/
src/ Functional/ ImageStyleWarmerDrushTest.php, line 30
Class
- ImageStyleWarmerDrushTest
- Tests the Drush commands provided by Image Style Warmer.
Namespace
Drupal\Tests\image_style_warmer\FunctionalCode
public function testDrushWarmUp() {
$this
->prepareImageStyleWarmerTests(TRUE);
// Run Image Style Warmer's drush cron command and check that the expected
// messages are found.
$this
->drush('image-style-warmer:warm-up');
$messages = $this
->getErrorOutput();
$this
->assertStringContainsString('Warming up styles for file 1 (1/1)', $messages, 'Warming up styles for 1 file message not found', TRUE);
$this
->assertStringContainsString('1 files warmed up', $messages, '1 files warmed up message not found', TRUE);
$this
->assertStringContainsString('Batch operations end', $messages, 'Batch operations end message not found', TRUE);
}