Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor1/web/modules/contrib/redirect/tests/src/Functional/

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/modules/contrib/redirect/tests/src/Functional/RedirectHooksTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\redirect\Functional;

use Drupal\redirect\Entity\Redirect;
use Drupal\Tests\BrowserTestBase;

/**
 * Test the functionality of the Redirect module hooks.
 *
 * @ingroup redirect_api_hooks
 *
 * @group redirect
 */
class RedirectHooksTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = ['redirect_test'];

  /**
   * {@inheritdoc}
   */
  protected $profile = 'minimal';

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * {@inheritdoc}
   */
  public function setUp(): void {
    parent::setUp();

    // Create two redirects.
    $redirect = Redirect::create();
    $redirect->setSource('/test/redirect/1');
    $redirect->setRedirect('/test/redirect/1/successful');
    $redirect->setStatusCode(301);
    $redirect->save();

    $redirect = Redirect::create();
    $redirect->setSource('/test/redirect/2');
    $redirect->setRedirect('/test/redirect/2/successful');
    $redirect->setStatusCode(301);
    $redirect->save();
  }

  /**
   * Test the redirects.
   */
  public function testRedirectResponseHook() {
    $this->drupalGet('test/redirect/1');
    $this->assertSession()->addressEquals('test/redirect/1/successful');

    $this->drupalGet('test/redirect/2');
    $this->assertSession()->addressEquals('test/redirect/other');
  }

}

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