function UpdateReportTest::testTemplatePreprocessUpdateReport
Tests template preprocess update report.
@legacy-covers ::preprocessUpdateReport
Attributes
#[DataProvider('providerTemplatePreprocessUpdateReport')]
File
-
core/
modules/ update/ tests/ src/ Kernel/ UpdateReportTest.php, line 40
Class
- UpdateReportTest
- Tests update report functionality.
Namespace
Drupal\Tests\update\KernelCode
public function testTemplatePreprocessUpdateReport($variables) : void {
// The function should run without an exception being thrown when the value
// of $variables['data'] is not set or is not an array.
\Drupal::service(UpdateThemeHooks::class)->preprocessUpdateReport($variables);
// Test that the key "no_updates_message" has been set.
$this->assertArrayHasKey('no_updates_message', $variables);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.