You are here

protected function AutomaticUpdatesFunctionalTestBase::setReleaseMetadata in Automatic Updates 8.2

Sets the release metadata file to use when fetching available updates.

Parameters

string $file: The path of the XML metadata file to use.

3 calls to AutomaticUpdatesFunctionalTestBase::setReleaseMetadata()
FileSystemOperationsTest::setUp in tests/src/Functional/FileSystemOperationsTest.php
ReadinessValidationTest::setUp in tests/src/Functional/ReadinessValidationTest.php
UpdaterFormTest::setUp in tests/src/Functional/UpdaterFormTest.php

File

tests/src/Functional/AutomaticUpdatesFunctionalTestBase.php, line 57

Class

AutomaticUpdatesFunctionalTestBase
Base class for functional tests of the Automatic Updates module.

Namespace

Drupal\Tests\automatic_updates\Functional

Code

protected function setReleaseMetadata(string $file) : void {
  $this
    ->config('update.settings')
    ->set('fetch.url', $this->baseUrl . '/automatic-update-test')
    ->save();
  [
    $project,
    $fixture,
  ] = explode('.', basename($file, '.xml'), 2);
  $this
    ->config('update_test.settings')
    ->set('xml_map', [
    $project => $fixture,
  ])
    ->save();
}