You are here

public function DeprecatedPathHooksTest::testInsert in Drupal 8

@covers ::save

@expectedDeprecation The deprecated hook hook_path_insert() is implemented in these functions: path_deprecated_test_path_insert(). It will be removed before Drupal 9.0.0. Use hook_ENTITY_TYPE_insert() for the 'path_alias' entity type instead. See https://www.drupal.org/node/3013865.

File

core/modules/system/tests/src/Kernel/DeprecatedPathHooksTest.php, line 35

Class

DeprecatedPathHooksTest
@coversDefaultClass \Drupal\Core\Path\AliasStorage

Namespace

Drupal\Tests\system\Kernel

Code

public function testInsert() {
  $source = '/' . $this
    ->randomMachineName();
  $alias = '/' . $this
    ->randomMachineName();
  $alias_storage = \Drupal::service('path.alias_storage');
  $alias_storage
    ->save($source, $alias);
}