private function getUser($secret = 'SECRET') { $user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\Google\\TwoFactorInterface'); $user->expects($this->any())->method('getGoogleAuthenticatorSecret')->willReturn($secret); return $user; }