|
|
|
|
|
|
|
|
$this->request |
|
|
$this->request |
|
|
->expects($this->once()) |
|
|
->expects($this->once()) |
|
|
->method('isUserAgent') |
|
|
->method('isUserAgent') |
|
|
->willReturn(true); |
|
|
|
|
|
|
|
|
->willReturn(false); |
|
|
$this->config |
|
|
$this->config |
|
|
->expects($this->never()) |
|
|
->expects($this->never()) |
|
|
->method('deleteUserValue'); |
|
|
->method('deleteUserValue'); |
|
|
|
|
|
|
|
|
->method('getCookie') |
|
|
->method('getCookie') |
|
|
->with('nc_token') |
|
|
->with('nc_token') |
|
|
->willReturn(null); |
|
|
->willReturn(null); |
|
|
|
|
|
$this->request |
|
|
|
|
|
->method('getServerProtocol') |
|
|
|
|
|
->willReturn('https'); |
|
|
$this->request |
|
|
$this->request |
|
|
->expects($this->once()) |
|
|
->expects($this->once()) |
|
|
->method('isUserAgent') |
|
|
->method('isUserAgent') |
|
|
|
|
|
|
|
|
->method('getCookie') |
|
|
->method('getCookie') |
|
|
->with('nc_token') |
|
|
->with('nc_token') |
|
|
->willReturn('MyLoginToken'); |
|
|
->willReturn('MyLoginToken'); |
|
|
|
|
|
$this->request |
|
|
|
|
|
->method('getServerProtocol') |
|
|
|
|
|
->willReturn('https'); |
|
|
$this->request |
|
|
$this->request |
|
|
->expects($this->once()) |
|
|
->expects($this->once()) |
|
|
->method('isUserAgent') |
|
|
->method('isUserAgent') |