src/Graviton/SecurityBundle/Authentication/Provider/AuthenticationProviderDummy.php
public function loadUserByUsername($username)
    {
        if ($username !== 'testUsername') {
            return false;
        }

        /** @var UserInterface $user */
        $user = new \stdClass();
        $user->id = 123;
        $user->username = $username;
        $user->firstName = 'aName';
        $user->lastName = 'aSurname';

        return $user;
    }
public function loadUserByUsername($username)
    {
        if ($username !== 'testUsername') {
            return false;
        }

        /** @var UserInterface $user */
        $user = new \stdClass();
        $user->id = 123;
        $user->username = $username;
        $user->firstName = 'aName';
        $user->lastName = 'aSurname';

        return $user;
    }
public function loadUserByUsername ( $ username ) { if ( $ username !== 'testUsername' ) { return false ; } /** @var UserInterface $user */ $ user = new \ stdClass ( ) ; $ user -> id = 123 ; $ user -> username = $ username ; $ user -> firstName = 'aName' ; $ user -> lastName = 'aSurname' ; return $ user ; }
Dummy loader for test case

This method must throw UsernameNotFoundException if the user is not
found.

@param string $username the consultants username

@return false|UserInterface
Dummy loader for test case