RequestStackLegacyTest.php in Drupal 10
File
core/tests/Drupal/Tests/Core/Http/RequestStackLegacyTest.php
View source
<?php
namespace Drupal\Tests\Core\Http;
use Drupal\Core\Http\RequestStack;
use Drupal\Tests\UnitTestCase;
class RequestStackLegacyTest extends UnitTestCase {
public function testGetMainRequestDeprecation() {
$stack = new RequestStack();
$this
->expectDeprecation('The Drupal\\Core\\Http\\RequestStack is deprecated in drupal:10.0.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3265357');
$this
->assertNull($stack
->getMainRequest());
}
}