function DeprecatedServicesTest::assertServiceClass

Asserts that the specified service is implemented by the expected class.

Parameters

string $service_id: A service ID.

string $expected_class: The name of the expected class.

6 calls to DeprecatedServicesTest::assertServiceClass()
DeprecatedServicesTest::testDecoratorForNewServiceImplementation in core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php
@expectedDeprecation The "path_alias_deprecated_test.path.alias_manager.inner" service is deprecated. Use "path_alias.manager" instead. See https://drupal.org/node/3092086
DeprecatedServicesTest::testDecoratorForOverriddenServiceImplementation in core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php
@expectedDeprecation The "path_alias_deprecated_test.path.alias_manager.inner" service is deprecated. Use "path_alias.manager" instead. See https://drupal.org/node/3092086 @expectedDeprecation The \Drupal\Core\Path\AliasManager…
DeprecatedServicesTest::testDefaultImplementations in core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php
@expectedDeprecation The "path.alias_manager" service is deprecated. Use "path_alias.manager" instead. See https://drupal.org/node/3092086
DeprecatedServicesTest::testNewServiceImplementation in core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php
@expectedDeprecation The "path.alias_manager" service is deprecated. Use "path_alias.manager" instead. See https://drupal.org/node/3092086
DeprecatedServicesTest::testOverriddenServiceImplementation in core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php
@expectedDeprecation The "path.alias_manager" service is deprecated. Use "path_alias.manager" instead. See https://drupal.org/node/3092086 @expectedDeprecation The \Drupal\Core\Path\AliasManager class is deprecated in drupal:8.8.0…

... See full list

File

core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php, line 166

Class

DeprecatedServicesTest
Tests deprecation of path alias core services and the related BC logic.

Namespace

Drupal\Tests\path_alias\Kernel

Code

protected function assertServiceClass($service_id, $expected_class) {
    $service = $this->container
        ->get($service_id);
    $this->assertSame(get_class($service), $expected_class);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.