summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-07-25 11:41:24 +0200
committerGitHub <noreply@github.com>2016-07-25 11:41:24 +0200
commit4ad0c383ade90eb2f339daa392828e145f1a3b6b (patch)
tree0c223080b36bbff7a2aaeef3bb5db2d97c408dee /tests
parent6a25e5f0eb56d3c712a2025a2df590a6da651dab (diff)
parent61a1d56d2784d407ac0922ea1fcd382b21f3df06 (diff)
downloadnextcloud-server-4ad0c383ade90eb2f339daa392828e145f1a3b6b.tar.gz
nextcloud-server-4ad0c383ade90eb2f339daa392828e145f1a3b6b.zip
Merge pull request #523 from Faldon/master
Renamed file logging
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Command/Log/FileTest.php (renamed from tests/Core/Command/Log/OwnCloudTest.php)12
-rw-r--r--tests/Core/Command/Log/ManageTest.php2
-rw-r--r--tests/lib/Log/FileTest.php (renamed from tests/lib/Log/OwncloudTest.php)12
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/Core/Command/Log/OwnCloudTest.php b/tests/Core/Command/Log/FileTest.php
index e0445a5cfda..f55f92901d6 100644
--- a/tests/Core/Command/Log/OwnCloudTest.php
+++ b/tests/Core/Command/Log/FileTest.php
@@ -22,10 +22,10 @@
namespace Tests\Core\Command\Log;
-use OC\Core\Command\Log\OwnCloud;
+use OC\Core\Command\Log\File;
use Test\TestCase;
-class OwnCloudTest extends TestCase {
+class FileTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject */
protected $config;
/** @var \PHPUnit_Framework_MockObject_MockObject */
@@ -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');
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/lib/Log/OwncloudTest.php b/tests/lib/Log/FileTest.php
index e19063a83f5..4bd5b6f21ab 100644
--- a/tests/lib/Log/OwncloudTest.php
+++ b/tests/lib/Log/FileTest.php
@@ -17,15 +17,15 @@
namespace Test\Log;
-use OC\Log\Owncloud;
+use OC\Log\File;
use Test\TestCase;
/**
- * Class OwncloudTest
+ * Class FileTest
*
* @group DB
*/
-class OwncloudTest extends TestCase
+class FileTest extends TestCase
{
private $restore_logfile;
private $restore_logdateformat;
@@ -37,7 +37,7 @@ class OwncloudTest extends TestCase
$this->restore_logdateformat = $config->getSystemValue('logdateformat');
$config->setSystemValue("logfile", $config->getSystemValue('datadirectory') . "/logtest");
- Owncloud::init();
+ File::init();
}
protected function tearDown() {
$config = \OC::$server->getConfig();
@@ -51,7 +51,7 @@ class OwncloudTest extends TestCase
} else {
$config->deleteSystemValue("restore_logdateformat");
}
- Owncloud::init();
+ File::init();
parent::tearDown();
}
@@ -62,7 +62,7 @@ class OwncloudTest extends TestCase
# set format & write log line
$config->setSystemValue('logdateformat', 'u');
- Owncloud::write('test', 'message', \OCP\Util::ERROR);
+ File::write('test', 'message', \OCP\Util::ERROR);
# read log line
$handle = @fopen($config->getSystemValue('logfile'), 'r');