Signed-off-by: Joas Schilling <coding@schilljs.com>
$this->fileName = 'apps.json';
$this->config = $config;
- $versionArray = \OC_Util::getVersion();
+ $versionArray = explode('.', $this->config->getSystemValue('version'));
$this->endpointUrl = sprintf(
'https://apps.nextcloud.com/api/v1/platform/%d.%d.%d/apps.json',
$versionArray[0],
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
+ $this->config
+ ->expects($this->atLeastOnce())
+ ->method('getSystemValue')
+ ->with('version')
+ ->willReturn('11.0.0.2');
+
$this->fetcher = new AppFetcher(
$this->appData,
$this->clientService,
->expects($this->once())
->method('getTime')
->willReturn(1234);
- $this->config
- ->expects($this->once())
- ->method('getSystemValue')
- ->with('version')
- ->willReturn('11.0.0.2');
$expected = array (
'data' =>