ThemePreprocessTest.php in Image Lazyloader 8
File
tests/src/Unit/ThemePreprocessTest.php
View source
<?php
namespace Drupal\Tests\lazyloader\Unit;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\lazyloader\ThemePreprocess;
use PHPUnit\Framework\TestCase;
class ThemePreprocessTest extends TestCase {
public function addsCacheTagToRenderArray() {
$sut = new ThemePreprocess($this
->createMock(ConfigFactoryInterface::class));
$expected = [
'#cache' => [
'tags' => [
0 => 'config:lazyloader.configuration',
],
],
];
$this
->assertEquals($expected, $sut
->addCacheTags([]));
}
}