Scheb\TwoFactorBundle\Tests\Command\GoogleSecretCommandTest::execute_googleAuthenticationEnabled_returnSecret PHP Méthode

execute_googleAuthenticationEnabled_returnSecret() public méthode

    public function execute_googleAuthenticationEnabled_returnSecret()
    {
        //Mock the GoogleAuthenticator
        $googleAuthenticator = $this->createMock('Scheb\\TwoFactorBundle\\Security\\TwoFactor\\Provider\\Google\\GoogleAuthenticator');
        $googleAuthenticator->expects($this->once())->method('generateSecret')->willReturn('secretCode');
        //Stub the container to return GoogleAuthenticator
        $container = $this->createContainerStub(true, $googleAuthenticator);
        $this->command->setContainer($container);
        $input = $this->createMock('Symfony\\Component\\Console\\Input\\InputInterface');
        $output = $this->createMock('Symfony\\Component\\Console\\Output\\OutputInterface');
        //Expect some output
        $output->expects($this->once())->method('writeln')->with('<info>Secret:</info> secretCode');
        $this->command->execute($input, $output);
    }