reviewer-1.2.x-dev/modules/reviewer_examples/src/Plugin/reviewer/Task/SystemPerformance.php
modules/reviewer_examples/src/Plugin/reviewer/Task/SystemPerformance.php
<?php
declare(strict_types=1);
namespace Drupal\reviewer_examples\Plugin\reviewer\Task;
use Drupal\reviewer\Attribute\Task;
use Drupal\reviewer_test_kit\Plugin\reviewer\Task\ConfigTaskBase;
/**
* Check the system.performance configuration.
*/
#[Task('system_performance')]
final class SystemPerformance extends ConfigTaskBase {
/**
* {@inheritdoc}
*/
protected string $configName = 'system.performance';
/**
* {@inheritdoc}
*/
protected array $expectedValues = [
'cache' => [
'page' => [
'max_age' => 86400,
],
],
// Ensure that assets are combined and compressed.
'css' => [
'preprocess' => TRUE,
'gzip' => TRUE,
],
'js' => [
'preprocess' => TRUE,
'gzip' => TRUE,
],
];
}
