You are here

public function RequestStackLegacyTest::testGetMasterRequestDeprecation in Drupal 9

Tests deprecation message in our subclassed RequestStack.

@covers ::getMasterRequest

File

core/tests/Drupal/Tests/Core/Http/RequestStackLegacyTest.php, line 19

Class

RequestStackLegacyTest
@coversDefaultClass \Drupal\Core\Http\RequestStack @group legacy

Namespace

Drupal\Tests\Core\Http

Code

public function testGetMasterRequestDeprecation() {
  $stack = new RequestStack();
  $this
    ->expectDeprecation('Drupal\\Core\\Http\\RequestStack::getMasterRequest() is deprecated, use getMainRequest() instead.');
  $this
    ->assertNull($stack
    ->getMasterRequest());
}