2016-09-12 08:57:15 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2016-09-12 08:57:15 -04:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-09-12 08:57:15 -04:00
|
|
|
*/
|
2019-11-22 14:52:10 -05:00
|
|
|
|
2016-09-12 08:57:15 -04:00
|
|
|
namespace Test\Files\AppData;
|
|
|
|
|
|
|
|
|
|
use OC\Files\AppData\Factory;
|
|
|
|
|
use OC\SystemConfig;
|
|
|
|
|
use OCP\Files\IRootFolder;
|
|
|
|
|
|
|
|
|
|
class FactoryTest extends \Test\TestCase {
|
2020-08-11 15:32:18 -04:00
|
|
|
/** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
|
2016-09-12 08:57:15 -04:00
|
|
|
private $rootFolder;
|
|
|
|
|
|
2020-08-11 15:32:18 -04:00
|
|
|
/** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
|
2016-09-12 08:57:15 -04:00
|
|
|
private $systemConfig;
|
|
|
|
|
|
|
|
|
|
/** @var Factory */
|
|
|
|
|
private $factory;
|
|
|
|
|
|
2019-11-27 09:27:18 -05:00
|
|
|
protected function setUp(): void {
|
2016-09-12 08:57:15 -04:00
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
|
|
$this->rootFolder = $this->createMock(IRootFolder::class);
|
|
|
|
|
$this->systemConfig = $this->createMock(SystemConfig::class);
|
|
|
|
|
$this->factory = new Factory($this->rootFolder, $this->systemConfig);
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-15 16:32:31 -04:00
|
|
|
public function testGet(): void {
|
2016-09-12 08:57:15 -04:00
|
|
|
$this->rootFolder->expects($this->never())
|
|
|
|
|
->method($this->anything());
|
|
|
|
|
$this->systemConfig->expects($this->never())
|
|
|
|
|
->method($this->anything());
|
|
|
|
|
|
|
|
|
|
$this->factory->get('foo');
|
|
|
|
|
}
|
|
|
|
|
}
|