You are here

class ProjectVersionClientMock in Acquia Content Hub 8.2

Mocks the ProjectVersionClient service.

@package Drupal\acquia_contenthub_server_test\Client

Hierarchy

Expanded class hierarchy of ProjectVersionClientMock

1 file declares its use of ProjectVersionClientMock
AcquiaContenthubServerTestServiceProvider.php in tests/modules/acquia_contenthub_server_test/src/AcquiaContenthubServerTestServiceProvider.php

File

tests/modules/acquia_contenthub_server_test/src/Client/ProjectVersionClientMock.php, line 12

Namespace

Drupal\acquia_contenthub_server_test\Client
View source
class ProjectVersionClientMock extends ProjectVersionClient {

  /**
   * {@inheritDoc}
   */
  public function getContentHubReleases() : array {
    return [
      'latest' => '8.x-2.25',
    ];
  }

  /**
   * {@inheritDoc}
   */
  public function getDrupalReleases(string $drupal_version) : array {
    return [
      'also_available' => '9.2.1',
      'latest' => '8.9.16',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ProjectVersionClient::$achLoggerChannel protected property The acquia_contenthub logger channel.
ProjectVersionClient::$fetchUrl protected property URL to check for updates.
ProjectVersionClient::$httpClient protected property The HTTP client to fetch the project release data.
ProjectVersionClient::getReleaseData public function Helper method to get latest release versions for a given d.o project.
ProjectVersionClient::isLatestVersion protected function Checks whether the module's version is the latest.
ProjectVersionClient::isSecurityCoveredRelease protected function Checks whether a given release is security covered on D.O.
ProjectVersionClient::parseXml protected function Parses XML from D.O and get latest versions of security covered releases.
ProjectVersionClient::__construct public function ProjectVersionClient constructor.
ProjectVersionClientMock::getContentHubReleases public function Returns latest versions of the acquia_contentub module from D.O. Overrides ProjectVersionClient::getContentHubReleases
ProjectVersionClientMock::getDrupalReleases public function Returns latest versions of drupal core from D.O. Overrides ProjectVersionClient::getDrupalReleases