aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Log
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
commit49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch)
tree2af18db46ba463368dc4461d7436fb69577923de /tests/lib/Log
parent4281ce6fa1bb8235426099d720734d2394bec203 (diff)
downloadnextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz
nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Log')
-rw-r--r--tests/lib/Log/ExceptionSerializerTest.php4
-rw-r--r--tests/lib/Log/FileTest.php4
-rw-r--r--tests/lib/Log/LogFactoryTest.php10
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Log/ExceptionSerializerTest.php b/tests/lib/Log/ExceptionSerializerTest.php
index 1ec422fb53d..6d5bc5cf19f 100644
--- a/tests/lib/Log/ExceptionSerializerTest.php
+++ b/tests/lib/Log/ExceptionSerializerTest.php
@@ -42,7 +42,7 @@ class ExceptionSerializerTest extends TestCase {
* exception was passed to the logger. The token was replaced, the original
* variable overwritten.
*/
- public function testSerializer() {
+ public function testSerializer(): void {
try {
$secret = ['Secret'];
$this->emit([&$secret]);
@@ -53,7 +53,7 @@ class ExceptionSerializerTest extends TestCase {
}
}
- public function testSerializerWithRegisteredMethods() {
+ public function testSerializerWithRegisteredMethods(): void {
$this->serializer->enlistSensitiveMethods(self::class, ['customMagicAuthThing']);
try {
$this->customMagicAuthThing('u57474', 'Secret');
diff --git a/tests/lib/Log/FileTest.php b/tests/lib/Log/FileTest.php
index 9deb6c8136c..b483da969f4 100644
--- a/tests/lib/Log/FileTest.php
+++ b/tests/lib/Log/FileTest.php
@@ -47,7 +47,7 @@ class FileTest extends TestCase {
parent::tearDown();
}
- public function testLogging() {
+ public function testLogging(): void {
$config = \OC::$server->get(IConfig::class);
# delete old logfile
unlink($config->getSystemValue('logfile'));
@@ -68,7 +68,7 @@ class FileTest extends TestCase {
$this->assertEquals('Testing logging', $values['message']);
}
- public function testMicrosecondsLogTimestamp() {
+ public function testMicrosecondsLogTimestamp(): void {
$config = \OC::$server->getConfig();
# delete old logfile
unlink($config->getSystemValue('logfile'));
diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php
index c1232f7b28d..22ee0dfb268 100644
--- a/tests/lib/Log/LogFactoryTest.php
+++ b/tests/lib/Log/LogFactoryTest.php
@@ -61,7 +61,7 @@ class LogFactoryTest extends TestCase {
* @dataProvider fileTypeProvider
* @throws \OCP\AppFramework\QueryException
*/
- public function testFile(string $type) {
+ public function testFile(string $type): void {
$datadir = \OC::$SERVERROOT.'/data';
$defaultLog = $datadir . '/nextcloud.log';
@@ -91,7 +91,7 @@ class LogFactoryTest extends TestCase {
* @dataProvider logFilePathProvider
* @throws \OCP\AppFramework\QueryException
*/
- public function testFileCustomPath($path, $expected) {
+ public function testFileCustomPath($path, $expected): void {
$datadir = \OC::$SERVERROOT.'/data';
$defaultLog = $datadir . '/nextcloud.log';
@@ -108,7 +108,7 @@ class LogFactoryTest extends TestCase {
/**
* @throws \OCP\AppFramework\QueryException
*/
- public function testErrorLog() {
+ public function testErrorLog(): void {
$log = $this->factory->get('errorlog');
$this->assertInstanceOf(Errorlog::class, $log);
}
@@ -116,7 +116,7 @@ class LogFactoryTest extends TestCase {
/**
* @throws \OCP\AppFramework\QueryException
*/
- public function testSystemLog() {
+ public function testSystemLog(): void {
$this->c->expects($this->once())
->method('resolve')
->with(Syslog::class)
@@ -129,7 +129,7 @@ class LogFactoryTest extends TestCase {
/**
* @throws \OCP\AppFramework\QueryException
*/
- public function testSystemdLog() {
+ public function testSystemdLog(): void {
$this->c->expects($this->once())
->method('resolve')
->with(Systemdlog::class)