aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/AppData/FactoryTest.php
blob: dff999d8b48fd764a6bf158460d58139cb085bec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace Test\Files\AppData;

use OC\Files\AppData\Factory;
use OC\SystemConfig;
use OCP\Files\IRootFolder;

class FactoryTest extends \Test\TestCase {
	/** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
	private $rootFolder;

	/** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
	private $systemConfig;

	/** @var Factory */
	private $factory;

	protected function setUp(): void {
		parent::setUp();

		$this->rootFolder = $this->createMock(IRootFolder::class);
		$this->systemConfig = $this->createMock(SystemConfig::class);
		$this->factory = new Factory($this->rootFolder, $this->systemConfig);
	}

	public function testGet(): void {
		$this->rootFolder->expects($this->never())
			->method($this->anything());
		$this->systemConfig->expects($this->never())
			->method($this->anything());

		$this->factory->get('foo');
	}
}