You are here

class AcquiaContenthubServerTestServiceProvider in Acquia Content Hub 8.2

Replace Content Hub Client Factory service for testing purposes.

Hierarchy

Expanded class hierarchy of AcquiaContenthubServerTestServiceProvider

File

tests/modules/acquia_contenthub_server_test/src/AcquiaContenthubServerTestServiceProvider.php, line 12

Namespace

Drupal\acquia_contenthub_server_test
View source
class AcquiaContenthubServerTestServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    $client_factory_def = $container
      ->getDefinition('acquia_contenthub.client.factory');
    $client_factory_def
      ->setClass('Drupal\\acquia_contenthub_server_test\\Client\\ClientFactoryMock');
    $pv_client_def = $container
      ->getDefinition('acquia_contenthub.project_version_client');
    $pv_client_def
      ->setClass(ProjectVersionClientMock::class);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AcquiaContenthubServerTestServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1