|
|
|
|
@ -234,7 +234,7 @@ abstract class FetcherBase extends TestCase {
|
|
|
|
|
$this->timeFactory
|
|
|
|
|
->expects($this->at(0))
|
|
|
|
|
->method('getTime')
|
|
|
|
|
->willReturn(1501);
|
|
|
|
|
->willReturn(4801);
|
|
|
|
|
$client = $this->createMock(IClient::class);
|
|
|
|
|
$this->clientService
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
@ -518,11 +518,11 @@ abstract class FetcherBase extends TestCase {
|
|
|
|
|
$this->timeFactory
|
|
|
|
|
->expects($this->at(0))
|
|
|
|
|
->method('getTime')
|
|
|
|
|
->willReturn(1501);
|
|
|
|
|
->willReturn(4801);
|
|
|
|
|
$this->timeFactory
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('getTime')
|
|
|
|
|
->willReturn(1502);
|
|
|
|
|
->willReturn(4802);
|
|
|
|
|
$client = $this->createMock(IClient::class);
|
|
|
|
|
$this->clientService
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
@ -544,7 +544,7 @@ abstract class FetcherBase extends TestCase {
|
|
|
|
|
$response->method('getStatusCode')
|
|
|
|
|
->willReturn(304);
|
|
|
|
|
|
|
|
|
|
$newData = '{"data":[{"id":"MyNewApp","foo":"foo"},{"id":"bar"}],"timestamp":1502,"ncversion":"11.0.0.2","ETag":"\"myETag\""}';
|
|
|
|
|
$newData = '{"data":[{"id":"MyNewApp","foo":"foo"},{"id":"bar"}],"timestamp":4802,"ncversion":"11.0.0.2","ETag":"\"myETag\""}';
|
|
|
|
|
$file
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('putContent')
|
|
|
|
|
@ -623,7 +623,7 @@ abstract class FetcherBase extends TestCase {
|
|
|
|
|
$response->method('getHeader')
|
|
|
|
|
->with($this->equalTo('ETag'))
|
|
|
|
|
->willReturn('"newETag"');
|
|
|
|
|
$fileData = '{"data":[{"id":"MyNewApp","foo":"foo"},{"id":"bar"}],"timestamp":1502,"ncversion":"11.0.0.2","ETag":"\"newETag\""}';
|
|
|
|
|
$fileData = '{"data":[{"id":"MyNewApp","foo":"foo"},{"id":"bar"}],"timestamp":4802,"ncversion":"11.0.0.2","ETag":"\"newETag\""}';
|
|
|
|
|
$file
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('putContent')
|
|
|
|
|
@ -635,11 +635,11 @@ abstract class FetcherBase extends TestCase {
|
|
|
|
|
$this->timeFactory
|
|
|
|
|
->expects($this->at(0))
|
|
|
|
|
->method('getTime')
|
|
|
|
|
->willReturn(1501);
|
|
|
|
|
->willReturn(4801);
|
|
|
|
|
$this->timeFactory
|
|
|
|
|
->expects($this->at(1))
|
|
|
|
|
->method('getTime')
|
|
|
|
|
->willReturn(1502);
|
|
|
|
|
->willReturn(4802);
|
|
|
|
|
|
|
|
|
|
$expected = [
|
|
|
|
|
[
|
|
|
|
|
|