Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/dataninja.cn/core/modules/system/tests/src/Kernel/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/dataninja.cn/core/modules/system/tests/src/Kernel/PathHooksTest.php

<?php

namespace Drupal\Tests\system\Kernel;

use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Path\AliasManagerInterface;
use Drupal\KernelTests\KernelTestBase;
use Prophecy\Argument;

/**
 * @group Drupal
 */
class PathHooksTest extends KernelTestBase {

  /**
   * {@inheritdoc}
   */
  public static $modules = ['system'];

  /**
   * Test system_path_*() correctly clears caches.
   */
  public function testPathHooks() {
    $source = '/' . $this->randomMachineName();
    $alias = '/' . $this->randomMachineName();

    // Check system_path_insert();
    $alias_manager = $this->prophesize(AliasManagerInterface::class);
    $alias_manager->cacheClear(Argument::any())->shouldBeCalledTimes(1);
    $alias_manager->cacheClear($source)->shouldBeCalledTimes(1);
    \Drupal::getContainer()->set('path.alias_manager', $alias_manager->reveal());
    $alias_storage = \Drupal::service('path.alias_storage');
    $alias_storage->save($source, $alias);

    $new_source = '/' . $this->randomMachineName();
    $path = $alias_storage->load(['source' => $source]);

    // Check system_path_update();
    $alias_manager = $this->prophesize(AliasManagerInterface::class);
    $alias_manager->cacheClear(Argument::any())->shouldBeCalledTimes(2);
    $alias_manager->cacheClear($source)->shouldBeCalledTimes(1);
    $alias_manager->cacheClear($new_source)->shouldBeCalledTimes(1);
    \Drupal::getContainer()->set('path.alias_manager', $alias_manager->reveal());
    $alias_storage->save($new_source, $alias, LanguageInterface::LANGCODE_NOT_SPECIFIED, $path['pid']);

    // Check system_path_delete();
    $alias_manager = $this->prophesize(AliasManagerInterface::class);
    $alias_manager->cacheClear(Argument::any())->shouldBeCalledTimes(1);
    $alias_manager->cacheClear($new_source)->shouldBeCalledTimes(1);
    \Drupal::getContainer()->set('path.alias_manager', $alias_manager->reveal());
    $alias_storage->delete(['pid' => $path['pid']]);

  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net