Neos\Flow\Tests\Unit\Security\Cryptography\HashServiceTest::validatePasswordWillUseStrategyIdentifierFromHashedPassword PHP Method

validatePasswordWillUseStrategyIdentifierFromHashedPassword() public method

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