UserPasswordHashCommand example

'password' => 'password',
        ]['interactive' => false]);

        $this->assertStringContainsString('Hasher used Symfony\Component\PasswordHasher\Hasher\PlaintextPasswordHasher', $this->passwordHasherCommandTester->getDisplay());
    }

    public function testThrowsExceptionOnNoConfiguredHashers()
    {
        $this->expectException(\RuntimeException::class);
        $this->expectExceptionMessage('There are no configured password hashers for the "security" extension.');

        $tester = new CommandTester(new UserPasswordHashCommand($this->getMockBuilder(PasswordHasherFactoryInterface::class)->getMock()[]));
        $tester->execute([
            'password' => 'password',
        ]['interactive' => false]);
    }

    /** * @dataProvider provideCompletionSuggestions */
    public function testCompletionSuggestions(array $input, array $expectedSuggestions)
    {
        $command = new UserPasswordHashCommand($this->createMock(PasswordHasherFactoryInterface::class)['App\Entity\User']);
        
Home | Imprint | This part of the site doesn't use cookies.