You are here

public function LegacyServiceTest::testSitePath in Drupal 9

Tests the site.path service.

File

core/tests/Drupal/KernelTests/Core/LegacyServiceTest.php, line 18

Class

LegacyServiceTest
Tests deprecated core services.

Namespace

Drupal\KernelTests\Core

Code

public function testSitePath() {
  $this
    ->expectDeprecation('The "site.path" service is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Use the site.path parameter instead. See https://www.drupal.org/node/3080612');
  $this
    ->expectDeprecation('The "site.path.factory" service is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Use the site.path parameter instead. See https://www.drupal.org/node/3080612');
  $this
    ->assertSame($this->container
    ->get('site.path'), (string) $this->container
    ->getParameter('site.path'));
}