Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor1/web/core/modules/user/tests/src/Kernel/Views/

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/user/tests/src/Kernel/Views/UserRoleTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\user\Kernel\Views;

use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
use Drupal\user\Entity\Role;
use Drupal\user\Entity\User;
use Drupal\views\Views;

/**
 * Tests rendering when the role is numeric.
 *
 * @group user
 */
class UserRoleTest extends ViewsKernelTestBase {

  /**
   * Tests numeric role.
   */
  public function testNumericRole(): void {
    $this->installEntitySchema('user');
    $this->installSchema('user', ['users_data']);

    Role::create(['id' => 123, 'label' => 'Numeric'])
      ->save();

    $user = User::create([
      'uid' => 2,
      'name' => 'foo',
      'roles' => 123,
    ]);
    $user->save();

    $view = Views::getView('user_admin_people');
    $this->executeView($view);
    $view->render('user_admin_people');
    $output = $view->field['roles_target_id']->render($view->result[0]);
    $this->assertEquals(2, $output);
  }

}

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