summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-01-11 08:14:24 +0100
committerGitHub <noreply@github.com>2017-01-11 08:14:24 +0100
commita90cbb0f094f0f418c0e6e78dcd406d34f7b3bd2 (patch)
tree66e8767a3bc1af9aaff0e6c443b2c8d24bf2d123 /tests
parent40239decb1b36f1daff53710e01d81e18c24f4fc (diff)
parent7fa063ceca5d78741c47f645c6dfdf65e4be7330 (diff)
downloadnextcloud-server-a90cbb0f094f0f418c0e6e78dcd406d34f7b3bd2.tar.gz
nextcloud-server-a90cbb0f094f0f418c0e6e78dcd406d34f7b3bd2.zip
Merge pull request #2951 from nextcloud/handle-nextcloud-log-type-gracefully
Handle log_type "nextcloud" more gracefully
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/LoggerTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php
index abb9deebd55..da9cedc9f56 100644
--- a/tests/lib/LoggerTest.php
+++ b/tests/lib/LoggerTest.php
@@ -138,4 +138,22 @@ class LoggerTest extends TestCase {
}
}
+ public function dataGetLogClass() {
+ return [
+ ['file', \OC\Log\File::class],
+ ['errorlog', \OC\Log\Errorlog::class],
+ ['syslog', \OC\Log\Syslog::class],
+
+ ['owncloud', \OC\Log\File::class],
+ ['nextcloud', \OC\Log\File::class],
+ ['foobar', \OC\Log\File::class],
+ ];
+ }
+
+ /**
+ * @dataProvider dataGetLogClass
+ */
+ public function testGetLogClass($type, $class) {
+ $this->assertEquals($class, Log::getLogClass($type));
+ }
}