aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Log/LogFactoryTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-06-30 16:56:59 +0200
committerRobin Appelman <robin@icewind.nl>2025-07-01 22:45:52 +0200
commitaa15f9d16d5b46d04763c7deedb129990e819364 (patch)
tree758e0aebcac34a545f9a21806120a9fcb96f4cb6 /tests/lib/Log/LogFactoryTest.php
parent1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff)
downloadnextcloud-server-rector-phpunit10.tar.gz
nextcloud-server-rector-phpunit10.zip
chore: run rectorrector-phpunit10
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Log/LogFactoryTest.php')
-rw-r--r--tests/lib/Log/LogFactoryTest.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php
index a3549ad7145..b1adbd0e823 100644
--- a/tests/lib/Log/LogFactoryTest.php
+++ b/tests/lib/Log/LogFactoryTest.php
@@ -13,6 +13,7 @@ use OC\Log\LogFactory;
use OC\Log\Syslog;
use OC\Log\Systemdlog;
use OC\SystemConfig;
+use OCP\AppFramework\QueryException;
use OCP\IServerContainer;
use Test\TestCase;
@@ -59,9 +60,9 @@ class LogFactoryTest extends TestCase {
/**
* @param string $type
- * @dataProvider fileTypeProvider
- * @throws \OCP\AppFramework\QueryException
+ * @throws QueryException
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('fileTypeProvider')]
public function testFile(string $type): void {
$datadir = \OC::$SERVERROOT . '/data';
$defaultLog = $datadir . '/nextcloud.log';
@@ -92,9 +93,9 @@ class LogFactoryTest extends TestCase {
}
/**
- * @dataProvider logFilePathProvider
- * @throws \OCP\AppFramework\QueryException
+ * @throws QueryException
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('logFilePathProvider')]
public function testFileCustomPath($path, $expected): void {
$datadir = \OC::$SERVERROOT . '/data';
$defaultLog = $datadir . '/nextcloud.log';
@@ -113,7 +114,7 @@ class LogFactoryTest extends TestCase {
}
/**
- * @throws \OCP\AppFramework\QueryException
+ * @throws QueryException
*/
public function testErrorLog(): void {
$log = $this->factory->get('errorlog');
@@ -121,7 +122,7 @@ class LogFactoryTest extends TestCase {
}
/**
- * @throws \OCP\AppFramework\QueryException
+ * @throws QueryException
*/
public function testSystemLog(): void {
$this->c->expects($this->once())
@@ -134,7 +135,7 @@ class LogFactoryTest extends TestCase {
}
/**
- * @throws \OCP\AppFramework\QueryException
+ * @throws QueryException
*/
public function testSystemdLog(): void {
$this->c->expects($this->once())