RedirectTest.php in Commerce Core 8.2
Namespace
Drupal\Tests\commerce\FunctionalFile
tests/src/Functional/RedirectTest.phpView source
<?php
namespace Drupal\Tests\commerce\Functional;
/**
* Tests redirection.
*
* @group commerce
*/
class RedirectTest extends CommerceBrowserTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'commerce_test',
];
/**
* Test redirection inside forms (via NeedsRedirectException).
*/
public function testRedirectForm() {
$this
->drupalGet('/commerce_test/redirect_form');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertEquals('https://www.example.org/', $this
->getSession()
->getCurrentUrl());
}
}
Classes
Name![]() |
Description |
---|---|
RedirectTest | Tests redirection. |