Bolt\Tests\EventListener\StorageEventListenerTest::testOnPreSavePasswordAlreadyHashed PHP Метод

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

It should detect already hashed passwords.
    public function testOnPreSavePasswordAlreadyHashed($hash)
    {
        $this->storageEvent->getContent()->willReturn($this->user->reveal());
        $this->user->getPassword()->willReturn($hash);
        $this->passwordFactory->createHash(Argument::cetera())->shouldNotBeCalled();
        $this->user->setPassword($hash)->shouldBeCalled();
        $this->listener->onUserEntityPreSave($this->storageEvent->reveal());
    }