function UpdateReportTest::providerTemplatePreprocessUpdateReport

Same name in other branches
  1. 8.9.x core/modules/update/tests/src/Kernel/UpdateReportTest.php \Drupal\Tests\update\Kernel\UpdateReportTest::providerTemplatePreprocessUpdateReport()
  2. 10 core/modules/update/tests/src/Kernel/UpdateReportTest.php \Drupal\Tests\update\Kernel\UpdateReportTest::providerTemplatePreprocessUpdateReport()
  3. 11.x core/modules/update/tests/src/Kernel/UpdateReportTest.php \Drupal\Tests\update\Kernel\UpdateReportTest::providerTemplatePreprocessUpdateReport()

Provides data for testTemplatePreprocessUpdateReport().

Return value

array Array of $variables for template_preprocess_update_report().

File

core/modules/update/tests/src/Kernel/UpdateReportTest.php, line 48

Class

UpdateReportTest
Tests update report functionality.

Namespace

Drupal\Tests\update\Kernel

Code

public function providerTemplatePreprocessUpdateReport() {
    return [
        '$variables with data not set' => [
            [],
        ],
        '$variables with data as an integer' => [
            [
                'data' => 4,
            ],
        ],
        '$variables with data as a string' => [
            [
                'data' => 'I am a string',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.