You are here

protected function ProjectReleaseTest::getValidData in Drupal 9

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 245

Class

ProjectReleaseTest
@coversDefaultClass \Drupal\update\ProjectRelease

Namespace

Drupal\Tests\update\Unit

Code

protected function getValidData() : array {
  return [
    'status' => 'published',
    'release_link' => 'https://drupal.org/release-link',
    'version' => '8.0.0',
    'download_link' => 'https://drupal.org/download-link',
    'core_compatibility_message' => 'This is compatible',
    'date' => 1452229200,
    'terms' => [
      'Release type' => [
        'Security update',
        'Unsupported',
        'Insecure',
      ],
    ],
    'core_compatible' => TRUE,
  ];
}