function ProjectInfoTest::testNotPublishedProject

Tests a project with a status other than "published".

@covers ::getInstallableReleases

File

core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php, line 186

Class

ProjectInfoTest
@coversDefaultClass \Drupal\package_manager\ProjectInfo @group auto_updates @internal

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testNotPublishedProject() : void {
    $this->setReleaseMetadata([
        'drupal' => __DIR__ . '/../../fixtures/release-history/drupal.9.8.2_unknown_status.xml',
    ]);
    $project_info = new ProjectInfo('drupal');
    $this->expectException(\RuntimeException::class);
    $this->expectExceptionMessage("The project 'drupal' can not be updated because its status is any status besides published");
    $project_info->getInstallableReleases();
}

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