class UserAuthenticationControllerTest
@coversDefaultClass \Drupal\user\Controller\UserController
@group user
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\user\Kernel\Controller\UserAuthenticationControllerTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of UserAuthenticationControllerTest
File
-
core/
modules/ user/ tests/ src/ Kernel/ Controller/ UserAuthenticationControllerTest.php, line 19
Namespace
Drupal\Tests\user\Kernel\ControllerView source
class UserAuthenticationControllerTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'user',
];
/**
* @group legacy
*/
public function testConstructorDeprecations() {
$this->expectDeprecation('Passing the flood service to Drupal\\user\\Controller\\UserAuthenticationController::__construct is deprecated in drupal:9.1.0 and is replaced by user.flood_control in drupal:10.0.0. See https://www.drupal.org/node/3067148');
$flood = $this->prophesize(FloodInterface::class);
$user_storage = $this->prophesize(UserStorageInterface::class);
$csrf_token = $this->prophesize(CsrfTokenGenerator::class);
$user_auth = $this->prophesize(UserAuthInterface::class);
$route_provider = $this->prophesize(RouteProviderInterface::class);
$serializer = $this->prophesize(Serializer::class);
$serializer_formats = [];
$logger = $this->prophesize(LoggerInterface::class);
$controller = new UserAuthenticationController($flood->reveal(), $user_storage->reveal(), $csrf_token->reveal(), $user_auth->reveal(), $route_provider->reveal(), $serializer->reveal(), $serializer_formats, $logger->reveal());
$this->assertNotNull($controller);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.