
| Current Path : /var/www/html/rocksensor1/web/core/tests/Drupal/Tests/Core/Password/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/tests/Drupal/Tests/Core/Password/PasswordHashingLegacyTest.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests\Core\Password;
use Drupal\Core\Password\PhpassHashedPassword;
use Drupal\Tests\UnitTestCase;
/**
* Unit tests for deprecated password hashing API.
*
* @group System
* @group legacy
*/
class PasswordHashingLegacyTest extends UnitTestCase {
/**
* @covers \Drupal\Core\Password\PhpassHashedPassword
*/
public function testDeprecation(): void {
$this->expectDeprecation('\Drupal\Core\Password\PhpassHashedPassword is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. The password compatibility service has been moved to the phpass module. Use \Drupal\phpass\Password\PhpassHashedPassword instead. See https://www.drupal.org/node/3322420');
$this->expectDeprecation('Calling Drupal\Core\Password\PhpassHashedPasswordBase::__construct() with numeric $countLog2 as the first parameter is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use PhpassHashedPasswordInterface::__construct() with $corePassword parameter set to an instance of Drupal\Core\Password\PhpPassword instead. See https://www.drupal.org/node/3322420');
$passwordService = new PhpassHashedPassword(4);
$this->assertInstanceOf(PhpassHashedPassword::class, $passwordService);
}
}