function UpdateContribTest::testUnsupportedRelease
Tests messages when a project release is marked unsupported.
This test confirms unsupported messages are displayed regardless of whether the installed version is in a supported branch or not. This test relies on 2 test XML fixtures that are identical except for the 'supported_branches' value:
- aaa_update_test.1_0-supported.xml 'supported_branches' is '8.x-1.,8.x-2.'.
 - aaa_update_test.1_0-unsupported.xml 'supported_branches' is '8.x-2.'.
 
They both have an '8.x-1.1' release that has the 'Release type' value of 'unsupported' and an '8.x-2.0' release that has the 'Release type' value of 'supported' and is the expected update.
File
- 
              core/
modules/ update/ tests/ src/ Functional/ UpdateContribTest.php, line 799  
Class
- UpdateContribTest
 - Tests how the Update Manager handles contributed modules and themes.
 
Namespace
Drupal\Tests\update\FunctionalCode
public function testUnsupportedRelease() {
  $system_info = [
    'aaa_update_test' => [
      'project' => 'aaa_update_test',
      'version' => '8.x-1.1',
      'hidden' => FALSE,
    ],
  ];
  $this->config('update_test.settings')
    ->set('system_info', $system_info)
    ->save();
  $this->refreshUpdateStatus([
    'drupal' => '0.0',
    $this->updateProject => '1_0-supported',
  ]);
  // @todo Change the version label to 'Recommended version:' in
  // https://www.drupal.org/node/3114408.
  $this->confirmUnsupportedStatus('8.x-1.1', '8.x-2.0', 'Also available:');
  $this->refreshUpdateStatus([
    'drupal' => '0.0',
    $this->updateProject => '1_0-unsupported',
  ]);
  $this->confirmUnsupportedStatus('8.x-1.1', '8.x-2.0', 'Recommended version:');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.