Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor1/web/core/modules/config_translation/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/rocksensor1/web/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\config_translation\Kernel;

use Drupal\Core\Routing\RouteMatch;
use Drupal\KernelTests\KernelTestBase;
use Symfony\Component\Routing\Route;

/**
 * Tests config mapper.
 *
 * @group config_translation
 */
class ConfigMapperTest extends KernelTestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'config_translation',
    'config_translation_test',
    'language',
    'locale',
    'system',
  ];

  /**
   * Tests adding config names to mapper.
   */
  public function testAddingConfigNames(): void {
    // Get a config names mapper.
    $mappers = \Drupal::service('plugin.manager.config_translation.mapper')->getMappers();
    $mapper = $mappers['system.site_information_settings'];

    // Test that it doesn't contain a config name from config_translation_test.
    $config_names = $mapper->getConfigNames();
    $this->assertNotContains('config_translation_test.content', $config_names);

    // Call populateFromRouteMatch() to dispatch the "config mapper populate"
    // event.
    $mapper->populateFromRouteMatch(new RouteMatch('test', new Route('/')));

    // Test that it contains the new config name from config_translation_test.
    $config_names = $mapper->getConfigNames();
    $this->assertContains('config_translation_test.content', $config_names);
  }

}

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