You are here

public function ServicesDefaultsTest::testPrivateServices in Drupal 10

Tests that service from 'services_defaults_test.service' is private.

File

core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php, line 77

Class

ServicesDefaultsTest
Tests services _defaults definition.

Namespace

Drupal\KernelTests\Core\DependencyInjection

Code

public function testPrivateServices() {

  // Ensure default and overridden public flag works.
  $this
    ->expectException(ServiceNotFoundException::class);
  $this->container
    ->getDefinition('Drupal\\services_defaults_test\\TestPrivateService');
}