Neos\Flow\Tests\Unit\Security\Cryptography\HashServiceTest::hashPasswordWillIncludeStrategyIdentifierInHashedPassword PHP Метод

hashPasswordWillIncludeStrategyIdentifierInHashedPassword() публичный Метод

    public function hashPasswordWillIncludeStrategyIdentifierInHashedPassword()
    {
        $mockStrategy = $this->createMock(PasswordHashingStrategyInterface::class);
        $mockStrategy->expects($this->any())->method('hashPassword')->will($this->returnValue('---hashed-password---'));
        $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnValue($mockStrategy));
        $result = $this->hashService->hashPassword('myTestPassword', 'TestStrategy');
        $this->assertEquals('TestStrategy=>---hashed-password---', $result);
    }