Files
nextcloud-server-mirror/tests/lib/Files/AppData/FactoryTest.php
Côme Chilliet 611180d728 chore: Replace $this->mocks[… by $this->getAutoMock(… in tests
This is clearer, safer and better typed.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-10-01 15:45:42 +02:00

33 lines
738 B
PHP

<?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 Factory */
private $factory;
#[\Override]
protected function setUp(): void {
parent::setUp();
$this->factory = $this->createInstanceWithMocks(Factory::class);
}
public function testGet(): void {
$this->getAutoMock(IRootFolder::class)->expects($this->never())
->method($this->anything());
$this->getAutoMock(SystemConfig::class)->expects($this->never())
->method($this->anything());
$this->factory->get('foo');
}
}