public function UpdateReportTest::testTemplatePreprocessUpdateReport in Drupal 10
Same name and namespace in other branches
- 8 core/modules/update/tests/src/Kernel/UpdateReportTest.php \Drupal\Tests\update\Kernel\UpdateReportTest::testTemplatePreprocessUpdateReport()
- 9 core/modules/update/tests/src/Kernel/UpdateReportTest.php \Drupal\Tests\update\Kernel\UpdateReportTest::testTemplatePreprocessUpdateReport()
@dataProvider providerTemplatePreprocessUpdateReport
File
- core/
modules/ update/ tests/ src/ Kernel/ UpdateReportTest.php, line 31
Class
- UpdateReportTest
- Tests update report functionality.
Namespace
Drupal\Tests\update\KernelCode
public function testTemplatePreprocessUpdateReport($variables) {
\Drupal::moduleHandler()
->loadInclude('update', 'inc', 'update.report');
// The function should run without an exception being thrown when the value
// of $variables['data'] is not set or is not an array.
template_preprocess_update_report($variables);
// Test that the key "no_updates_message" has been set.
$this
->assertArrayHasKey('no_updates_message', $variables);
}