class ProjectVersionClientMock in Acquia Content Hub 8.2
Mocks the ProjectVersionClient service.
@package Drupal\acquia_contenthub_server_test\Client
Hierarchy
- class \Drupal\acquia_contenthub\Client\ProjectVersionClient
- class \Drupal\acquia_contenthub_server_test\Client\ProjectVersionClientMock
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\ClientView 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
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ProjectVersionClient:: |
protected | property | The acquia_contenthub logger channel. | |
ProjectVersionClient:: |
protected | property | URL to check for updates. | |
ProjectVersionClient:: |
protected | property | The HTTP client to fetch the project release data. | |
ProjectVersionClient:: |
public | function | Helper method to get latest release versions for a given d.o project. | |
ProjectVersionClient:: |
protected | function | Checks whether the module's version is the latest. | |
ProjectVersionClient:: |
protected | function | Checks whether a given release is security covered on D.O. | |
ProjectVersionClient:: |
protected | function | Parses XML from D.O and get latest versions of security covered releases. | |
ProjectVersionClient:: |
public | function | ProjectVersionClient constructor. | |
ProjectVersionClientMock:: |
public | function |
Returns latest versions of the acquia_contentub module from D.O. Overrides ProjectVersionClient:: |
|
ProjectVersionClientMock:: |
public | function |
Returns latest versions of drupal core from D.O. Overrides ProjectVersionClient:: |