1
0

FactoryTest.php 988 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace Test\Files\AppData;
  7. use OC\Files\AppData\Factory;
  8. use OC\SystemConfig;
  9. use OCP\Files\IRootFolder;
  10. class FactoryTest extends \Test\TestCase {
  11. /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
  12. private $rootFolder;
  13. /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
  14. private $systemConfig;
  15. /** @var Factory */
  16. private $factory;
  17. protected function setUp(): void {
  18. parent::setUp();
  19. $this->rootFolder = $this->createMock(IRootFolder::class);
  20. $this->systemConfig = $this->createMock(SystemConfig::class);
  21. $this->factory = new Factory($this->rootFolder, $this->systemConfig);
  22. }
  23. public function testGet() {
  24. $this->rootFolder->expects($this->never())
  25. ->method($this->anything());
  26. $this->systemConfig->expects($this->never())
  27. ->method($this->anything());
  28. $this->factory->get('foo');
  29. }
  30. }