1<?php 2 3namespace Drupal\Tests\user\Kernel\Form; 4 5use Drupal\Core\Language\LanguageManagerInterface; 6use Drupal\KernelTests\KernelTestBase; 7use Drupal\user\Form\UserPasswordForm; 8use Drupal\user\UserStorageInterface; 9 10/** 11 * @coversDefaultClass \Drupal\user\Form\UserPasswordForm 12 * @group user 13 */ 14class UserPasswordFormTest extends KernelTestBase { 15 16 /** 17 * @group legacy 18 * @expectedDeprecation Calling Drupal\user\Form\UserPasswordForm::__construct without the $config_factory is deprecated in drupal:8.8.0 and is required before drupal:9.0.0. See https://www.drupal.org/node/1681832 19 * @expectedDeprecation Calling Drupal\user\Form\UserPasswordForm::__construct without the $flood parameter is deprecated in drupal:8.8.0 and is required before drupal:9.0.0. See https://www.drupal.org/node/1681832 20 */ 21 public function testConstructorDeprecations() { 22 $user_storage = $this->prophesize(UserStorageInterface::class); 23 $language_manager = $this->prophesize(LanguageManagerInterface::class); 24 $form = new UserPasswordForm($user_storage->reveal(), $language_manager->reveal()); 25 $this->assertNotNull($form); 26 } 27 28} 29