|
|
|
|
@ -443,6 +443,12 @@ abstract class FetcherBase extends TestCase { |
|
|
|
|
$this->config->method('getSystemValueBool') |
|
|
|
|
->willReturnArgument(1); |
|
|
|
|
|
|
|
|
|
$this->config->method('getAppValue') |
|
|
|
|
->willReturnMap([ |
|
|
|
|
['settings', 'appstore-fetcher-lastFailure', '0', '0'], |
|
|
|
|
['settings', 'appstore-timeout', '120', '120'], |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
$folder = $this->createMock(ISimpleFolder::class); |
|
|
|
|
$file = $this->createMock(ISimpleFile::class); |
|
|
|
|
$this->appData |
|
|
|
|
@ -488,7 +494,7 @@ abstract class FetcherBase extends TestCase { |
|
|
|
|
->with( |
|
|
|
|
$this->equalTo($this->endpoint), |
|
|
|
|
$this->equalTo([ |
|
|
|
|
'timeout' => 60, |
|
|
|
|
'timeout' => 120, |
|
|
|
|
'headers' => [ |
|
|
|
|
'If-None-Match' => '"myETag"' |
|
|
|
|
] |
|
|
|
|
@ -522,6 +528,12 @@ abstract class FetcherBase extends TestCase { |
|
|
|
|
$this->config->method('getSystemValueBool') |
|
|
|
|
->willReturnArgument(1); |
|
|
|
|
|
|
|
|
|
$this->config->method('getAppValue') |
|
|
|
|
->willReturnMap([ |
|
|
|
|
['settings', 'appstore-fetcher-lastFailure', '0', '0'], |
|
|
|
|
['settings', 'appstore-timeout', '120', '120'], |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
$folder = $this->createMock(ISimpleFolder::class); |
|
|
|
|
$file = $this->createMock(ISimpleFile::class); |
|
|
|
|
$this->appData |
|
|
|
|
@ -565,7 +577,7 @@ abstract class FetcherBase extends TestCase { |
|
|
|
|
->with( |
|
|
|
|
$this->equalTo($this->endpoint), |
|
|
|
|
$this->equalTo([ |
|
|
|
|
'timeout' => 60, |
|
|
|
|
'timeout' => 120, |
|
|
|
|
'headers' => [ |
|
|
|
|
'If-None-Match' => '"myETag"', |
|
|
|
|
] |
|
|
|
|
@ -607,6 +619,12 @@ abstract class FetcherBase extends TestCase { |
|
|
|
|
$this->config->method('getSystemValueBool') |
|
|
|
|
->willReturnArgument(1); |
|
|
|
|
|
|
|
|
|
$this->config->method('getAppValue') |
|
|
|
|
->willReturnMap([ |
|
|
|
|
['settings', 'appstore-fetcher-lastFailure', '0', '0'], |
|
|
|
|
['settings', 'appstore-timeout', '120', '120'], |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
$folder = $this->createMock(ISimpleFolder::class); |
|
|
|
|
$file = $this->createMock(ISimpleFile::class); |
|
|
|
|
$this->appData |
|
|
|
|
@ -643,7 +661,7 @@ abstract class FetcherBase extends TestCase { |
|
|
|
|
->with( |
|
|
|
|
$this->equalTo($this->endpoint), |
|
|
|
|
$this->equalTo([ |
|
|
|
|
'timeout' => 60, |
|
|
|
|
'timeout' => 120, |
|
|
|
|
]) |
|
|
|
|
) |
|
|
|
|
->willReturn($response); |
|
|
|
|
|