diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-21 11:17:14 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-24 16:21:26 +0100 |
commit | 61f7f13bd81948f6179bb8f70b6711c002ddd70e (patch) | |
tree | f1238dd97d93203637bb203d4cf649b65c8fbc4a /tests/lib/Template | |
parent | e8c1f75064ae008e50daa087924de5d29368747e (diff) | |
download | nextcloud-server-61f7f13bd81948f6179bb8f70b6711c002ddd70e.tar.gz nextcloud-server-61f7f13bd81948f6179bb8f70b6711c002ddd70e.zip |
Migrate from ILogger to LoggerInterface where needed in the tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/Template')
-rw-r--r-- | tests/lib/Template/CSSResourceLocatorTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Template/IconsCacherTest.php | 10 | ||||
-rw-r--r-- | tests/lib/Template/JSCombinerTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Template/JSResourceLocatorTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Template/ResourceLocatorTest.php | 4 | ||||
-rw-r--r-- | tests/lib/Template/SCSSCacherTest.php | 6 |
6 files changed, 19 insertions, 19 deletions
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index 3a66d738f25..4832b03fe9b 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -34,8 +34,8 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; use OCP\ICacheFactory; use OCP\IConfig; -use OCP\ILogger; use OCP\IURLGenerator; +use Psr\Log\LoggerInterface; class CSSResourceLocatorTest extends \Test\TestCase { /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ @@ -48,7 +48,7 @@ class CSSResourceLocatorTest extends \Test\TestCase { protected $themingDefaults; /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; /** @var IconsCacher|\PHPUnit\Framework\MockObject\MockObject */ protected $iconsCacher; @@ -60,7 +60,7 @@ class CSSResourceLocatorTest extends \Test\TestCase { protected function setUp(): void { parent::setUp(); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->appData = $this->createMock(AppData::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php index 24b3c21052f..44e7f8075af 100644 --- a/tests/lib/Template/IconsCacherTest.php +++ b/tests/lib/Template/IconsCacherTest.php @@ -32,11 +32,11 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; -use OCP\ILogger; use OCP\IURLGenerator; +use Psr\Log\LoggerInterface; class IconsCacherTest extends \Test\TestCase { - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; @@ -46,7 +46,7 @@ class IconsCacherTest extends \Test\TestCase { private $timeFactory; protected function setUp(): void { - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->appData = $this->createMock(AppData::class); $this->timeFactory = $this->createMock(ITimeFactory::class); @@ -110,7 +110,7 @@ class IconsCacherTest extends \Test\TestCase { "; $expected = " icon.test { - + background-image: var(--icon-test); } "; @@ -133,7 +133,7 @@ class IconsCacherTest extends \Test\TestCase { "; $expected = " icon.test { - + background-image: var(--icon-test); } "; diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 87abff99123..5c678840c63 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -32,8 +32,8 @@ use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; use OCP\ICache; use OCP\ICacheFactory; -use OCP\ILogger; use OCP\IURLGenerator; +use Psr\Log\LoggerInterface; class JSCombinerTest extends \Test\TestCase { /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ @@ -46,7 +46,7 @@ class JSCombinerTest extends \Test\TestCase { protected $depsCache; /** @var JSCombiner */ protected $jsCombiner; - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; @@ -62,7 +62,7 @@ class JSCombinerTest extends \Test\TestCase { $this->cacheFactory->expects($this->at(0)) ->method('createDistributed') ->willReturn($this->depsCache); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->jsCombiner = new JSCombiner( $this->appData, $this->urlGenerator, diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index e3e1398dd17..7dedd4ad3c7 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -28,8 +28,8 @@ use OC\Template\JSCombiner; use OC\Template\JSResourceLocator; use OCP\Files\IAppData; use OCP\ICacheFactory; -use OCP\ILogger; use OCP\IURLGenerator; +use Psr\Log\LoggerInterface; class JSResourceLocatorTest extends \Test\TestCase { /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ @@ -40,7 +40,7 @@ class JSResourceLocatorTest extends \Test\TestCase { protected $config; /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; protected function setUp(): void { @@ -50,7 +50,7 @@ class JSResourceLocatorTest extends \Test\TestCase { $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->config = $this->createMock(SystemConfig::class); $this->cacheFactory = $this->createMock(ICacheFactory::class); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); } private function jsResourceLocator() { diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 04691451079..0cb28843a53 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -9,7 +9,7 @@ namespace Test\Template; use OC\Template\ResourceNotFoundException; -use OCP\ILogger; +use Psr\Log\LoggerInterface; class ResourceLocatorTest extends \Test\TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ @@ -17,7 +17,7 @@ class ResourceLocatorTest extends \Test\TestCase { protected function setUp(): void { parent::setUp(); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); } /** diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index 15966521a53..f7b7b3bb6d3 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -37,11 +37,11 @@ use OCP\Files\SimpleFS\ISimpleFolder; use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; -use OCP\ILogger; use OCP\IURLGenerator; +use Psr\Log\LoggerInterface; class SCSSCacherTest extends \Test\TestCase { - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; @@ -68,7 +68,7 @@ class SCSSCacherTest extends \Test\TestCase { protected function setUp(): void { parent::setUp(); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->appData = $this->createMock(AppData::class); $this->iconsCacher = $this->createMock(IconsCacher::class); $this->timeFactory = $this->createMock(ITimeFactory::class); |