function UpdateCalculateProjectDataTest::providerProjectStatus
Same name in other branches
- 11.x core/modules/update/tests/src/Kernel/UpdateCalculateProjectDataTest.php \Drupal\Tests\update\Kernel\UpdateCalculateProjectDataTest::providerProjectStatus()
Data provider for testProjectStatus().
The test cases rely on the following fixtures:
- drupal.project_status.revoked.0.2.xml: Project_status is 'revoked'.
- drupal.project_status.insecure.0.2.xml: Project_status is 'insecure'.
- drupal.project_status.unsupported.0.2.xml: Project_status is 'unsupported'.
Return value
array[] Test data.
File
-
core/
modules/ update/ tests/ src/ Kernel/ UpdateCalculateProjectDataTest.php, line 90
Class
- UpdateCalculateProjectDataTest
- Test the values set in update_calculate_project_data().
Namespace
Drupal\Tests\update\KernelCode
public static function providerProjectStatus() : array {
return [
'revoked' => [
'fixture' => '/../../fixtures/release-history/drupal.project_status.revoked.0.2.xml',
'status' => UpdateManagerInterface::REVOKED,
'label' => 'Project revoked',
'expected_error_message' => 'This project has been revoked, and is no longer available for download. Uninstalling everything included by this project is strongly recommended!',
],
'insecure' => [
'fixture' => '/../../fixtures/release-history/drupal.project_status.insecure.0.2.xml',
'status' => UpdateManagerInterface::NOT_SECURE,
'label' => 'Project not secure',
'expected_error_message' => 'This project has been labeled insecure by the Drupal security team, and is no longer available for download. Immediately uninstalling everything included by this project is strongly recommended!',
],
'unsupported' => [
'fixture' => '/../../fixtures/release-history/drupal.project_status.unsupported.0.2.xml',
'status' => UpdateManagerInterface::NOT_SUPPORTED,
'label' => 'Project not supported',
'expected_error_message' => 'This project is no longer supported, and is no longer available for download. Uninstalling everything included by this project is strongly recommended!',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.