function DevReleaseTest::getProjectData

Same name and namespace in other branches
  1. 11.x core/modules/update/tests/src/Kernel/DevReleaseTest.php \Drupal\Tests\update\Kernel\DevReleaseTest::getProjectData()
  2. 10 core/modules/update/tests/src/Kernel/DevReleaseTest.php \Drupal\Tests\update\Kernel\DevReleaseTest::getProjectData()

Gets project data from \Drupal\update\UpdateManagerInterface::calculateProjectData().

Parameters

array $system_info: System test information as used by update_test_system_info_alter().

Return value

array[] The project data as returned by \Drupal\update\UpdateManagerInterface::calculateProjectData().

See also

update_test_system_info_alter()

2 calls to DevReleaseTest::getProjectData()
DevReleaseTest::testSecurityUpdateEmptyProjectTimestamp in core/modules/update/tests/src/Kernel/DevReleaseTest.php
Tests security updates are empty with a dev version and an empty timestamp.
DevReleaseTest::testSecurityUpdates in core/modules/update/tests/src/Kernel/DevReleaseTest.php
Tests security updates when the installed version is a dev version.

File

core/modules/update/tests/src/Kernel/DevReleaseTest.php, line 135

Class

DevReleaseTest
Tests the project data when the installed version is a dev version.

Namespace

Drupal\Tests\update\Kernel

Code

private function getProjectData(array $system_info) : array {
  $this->config('update_test.settings')
    ->set('system_info', $system_info)
    ->save();
  \Drupal::service(UpdateManagerInterface::class)->reset();
  $available = \Drupal::service(UpdateManagerInterface::class)->getAvailable(TRUE);
  return \Drupal::service(UpdateManagerInterface::class)->calculateProjectData($available);
}

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