You are here

GoogleApplianceTestServiceProvider.php in Google Search Appliance 8

File

tests/modules/google_appliance_test/src/GoogleApplianceTestServiceProvider.php
View source
<?php

namespace Drupal\google_appliance_test;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceModifierInterface;

/**
 * Defines a class for modifying the search service in tests.
 */
class GoogleApplianceTestServiceProvider implements ServiceModifierInterface {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    $container
      ->getDefinition('google_appliance.search')
      ->setClass(TestSearch::class);
  }

}

Classes

Namesort descending Description
GoogleApplianceTestServiceProvider Defines a class for modifying the search service in tests.