diff options
author | Thomas Pulzer <t.pulzer@kniel.de> | 2016-07-22 11:44:19 +0200 |
---|---|---|
committer | Thomas Pulzer <t.pulzer@kniel.de> | 2016-07-22 11:44:19 +0200 |
commit | ba3f4f118e8c48a23dcffa723e38439f0b9b7df9 (patch) | |
tree | 40cf7127d4bb63f362a37185820eee50fd849ce8 /tests/Core/Command | |
parent | 4b4990c48fd4c6841bde260b2b2e1bc665b46e1c (diff) | |
download | nextcloud-server-ba3f4f118e8c48a23dcffa723e38439f0b9b7df9.tar.gz nextcloud-server-ba3f4f118e8c48a23dcffa723e38439f0b9b7df9.zip |
Changed logtype to file instead of owncloud.
- Updated the config sample to point to log_type='file'
- Renamed the Class for logfile logging to File in namespace 'OC\Log\'.
Changed the occurrences of 'OC\Log\Owncloud' to 'OC\Log\File'.
- Renamed the Class for log:file command to File in namespace 'OC\Core\Command\Log\File'.
Changed registration of the command to use 'OC\Core\Command\Log\File'.
- Changed default Syslog tag to Nextcloud
- Retained backwards compatibility for configs with 'logtype' => 'owncloud'
- Adjusted tests for the new file log.
Closes #490.
Diffstat (limited to 'tests/Core/Command')
-rw-r--r-- | tests/Core/Command/Log/ManageTest.php | 2 | ||||
-rw-r--r-- | tests/Core/Command/Log/OwnCloudTest.php | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index 6fb83347f23..cf4506a64eb 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -154,7 +154,7 @@ class ManageTest extends TestCase { public function testGetConfiguration() { $this->config->expects($this->at(0)) ->method('getSystemValue') - ->with('log_type', 'owncloud') + ->with('log_type', 'file') ->willReturn('log_type_value'); $this->config->expects($this->at(1)) ->method('getSystemValue') diff --git a/tests/Core/Command/Log/OwnCloudTest.php b/tests/Core/Command/Log/OwnCloudTest.php index e0445a5cfda..8f217cce653 100644 --- a/tests/Core/Command/Log/OwnCloudTest.php +++ b/tests/Core/Command/Log/OwnCloudTest.php @@ -22,7 +22,7 @@ namespace Tests\Core\Command\Log; -use OC\Core\Command\Log\OwnCloud; +use OC\Core\Command\Log\File; use Test\TestCase; class OwnCloudTest extends TestCase { @@ -45,7 +45,7 @@ class OwnCloudTest extends TestCase { $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); - $this->command = new OwnCloud($config); + $this->command = new File($config); } public function testEnable() { @@ -55,7 +55,7 @@ class OwnCloudTest extends TestCase { ])); $this->config->expects($this->once()) ->method('setSystemValue') - ->with('log_type', 'owncloud'); + ->with('log_type', 'file'); self::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]); } @@ -99,7 +99,7 @@ class OwnCloudTest extends TestCase { public function testGetConfiguration() { $this->config->method('getSystemValue') ->will($this->returnValueMap([ - ['log_type', 'owncloud', 'log_type_value'], + ['log_type', 'file', 'log_type_value'], ['datadirectory', \OC::$SERVERROOT.'/data', '/data/directory/'], ['logfile', '/data/directory/nextcloud.log', '/var/log/nextcloud.log'], ['log_rotate_size', 0, 5 * 1024 * 1024], @@ -107,7 +107,7 @@ class OwnCloudTest extends TestCase { $this->consoleOutput->expects($this->at(0)) ->method('writeln') - ->with('Log backend ownCloud: disabled'); + ->with('Log backend file: disabled'); $this->consoleOutput->expects($this->at(1)) ->method('writeln') ->with('Log file: /var/log/nextcloud.log'); |