Contao\CoreBundle\Test\Command\UserPasswordCommandTest::testDatabaseUpdate PHP Method

testDatabaseUpdate() public method

Tests the database update.
public testDatabaseUpdate ( string $username, string $password )
$username string
$password string
    public function testDatabaseUpdate($username, $password)
    {
        /** @var \PHPUnit_Framework_MockObject_MockObject $connection */
        $connection = $this->container->get('database_connection');
        $connection->expects($this->once())->method('update')->with('tl_user', ['password' => 'HA$HED-' . $password . '-HA$HED'], ['username' => $username])->willReturn(1);
        (new CommandTester($this->command))->execute(['username' => $username, '--password' => $password], ['interactive' => false]);
    }