aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Log/LogFactoryTest.php
diff options
context:
space:
mode:
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())