class ThemePreprocessTest in Image Lazyloader 8
Tests preprocessing.
@coversDefaultClass \Drupal\lazyloader\ThemePreprocess @group lazyloader
Hierarchy
- class \Drupal\Tests\lazyloader\Unit\ThemePreprocessTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of ThemePreprocessTest
File
- tests/
src/ Unit/ ThemePreprocessTest.php, line 15
Namespace
Drupal\Tests\lazyloader\UnitView source
class ThemePreprocessTest extends TestCase {
/**
* Tests that cache tags are properly added to the render array.
*
* @test
*/
public function addsCacheTagToRenderArray() {
$sut = new ThemePreprocess($this
->createMock(ConfigFactoryInterface::class));
$expected = [
'#cache' => [
'tags' => [
0 => 'config:lazyloader.configuration',
],
],
];
$this
->assertEquals($expected, $sut
->addCacheTags([]));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ThemePreprocessTest:: |
public | function | Tests that cache tags are properly added to the render array. |