function ProjectReleaseTest::getValidData
Same name in other branches
- 9 core/modules/update/tests/src/Unit/ProjectReleaseTest.php \Drupal\Tests\update\Unit\ProjectReleaseTest::getValidData()
- 11.x core/modules/update/tests/src/Unit/ProjectReleaseTest.php \Drupal\Tests\update\Unit\ProjectReleaseTest::getValidData()
Gets valid data for a project release.
Return value
mixed[] The data for the project release.
4 calls to ProjectReleaseTest::getValidData()
- ProjectReleaseTest::testCreateFromArray in core/
modules/ update/ tests/ src/ Unit/ ProjectReleaseTest.php - Tests creating with valid data.
- ProjectReleaseTest::testCreateFromArrayInvalidField in core/
modules/ update/ tests/ src/ Unit/ ProjectReleaseTest.php - Tests exceptions for invalid field types.
- ProjectReleaseTest::testCreateFromArrayMissingField in core/
modules/ update/ tests/ src/ Unit/ ProjectReleaseTest.php - Tests exceptions with missing fields.
- ProjectReleaseTest::testOptionalFields in core/
modules/ update/ tests/ src/ Unit/ ProjectReleaseTest.php - Tests that optional fields can be omitted.
File
-
core/
modules/ update/ tests/ src/ Unit/ ProjectReleaseTest.php, line 247
Class
- ProjectReleaseTest
- @coversDefaultClass \Drupal\update\ProjectRelease
Namespace
Drupal\Tests\update\UnitCode
protected function getValidData() : array {
return [
'status' => 'published',
'release_link' => 'https://example.com/release-link',
'version' => '8.0.0',
'download_link' => 'https://example.com/download-link',
'core_compatibility_message' => 'This is compatible',
'date' => 1452229200,
'terms' => [
'Release type' => [
'Security update',
'Unsupported',
'Insecure',
],
],
'core_compatible' => TRUE,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.