You are here

class LingotekTestServiceProvider in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  2. 4.0.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  3. 3.0.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  4. 3.1.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  5. 3.2.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  6. 3.3.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  7. 3.4.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  8. 3.5.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  9. 3.6.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  10. 3.7.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider
  11. 3.8.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider

Modifies the lingotek service.

Hierarchy

Expanded class hierarchy of LingotekTestServiceProvider

File

tests/modules/lingotek_test/src/LingotekTestServiceProvider.php, line 15
Contains Drupal\lingotek_test\LingotekServiceProvider

Namespace

Drupal\lingotek_test
View source
class LingotekTestServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {

    // Overrides lingotek class to mock communication with the server.
    $definition = $container
      ->getDefinition('lingotek');
    $definition
      ->setClass('Drupal\\lingotek_test\\LingotekFake');
  }

}

Members

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