use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IConfig;
+use OCP\ILogger;
use Test\TestCase;
class AppFetcherTest extends TestCase {
protected $timeFactory;
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
protected $config;
+ /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ protected $logger;
/** @var AppFetcher */
protected $fetcher;
/** @var string */
$this->clientService = $this->createMock(IClientService::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
+ $this->logger = $this->createMock(ILogger::class);
$this->config
->expects($this->at(0))
$factory,
$this->clientService,
$this->timeFactory,
- $this->config
+ $this->config,
+ $this->logger
);
}
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IConfig;
+use OCP\ILogger;
use Test\TestCase;
abstract class FetcherBase extends TestCase {
protected $timeFactory;
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
protected $config;
+ /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ protected $logger;
/** @var Fetcher */
protected $fetcher;
/** @var string */
$this->clientService = $this->createMock(IClientService::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
+ $this->logger = $this->createMock(ILogger::class);
}
public function testGetWithAlreadyExistingFileAndUpToDateTimestampAndVersion() {