Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/PHPUnit/Integration/Log/Fixture/LoggerWrapper.php (renamed from tests/resources/TestPluginLogClass.php)4
-rw-r--r--tests/PHPUnit/Integration/Log/LogTest.php18
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/resources/TestPluginLogClass.php b/tests/PHPUnit/Integration/Log/Fixture/LoggerWrapper.php
index 3a95fe0cfb..07b8a04d20 100644
--- a/tests/resources/TestPluginLogClass.php
+++ b/tests/PHPUnit/Integration/Log/Fixture/LoggerWrapper.php
@@ -6,11 +6,11 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\TestPlugin;
+namespace Piwik\Tests\Integration\Log\Fixture;
use Piwik\Log;
-class TestLoggingUtility
+class LoggerWrapper
{
public static function doLog($message)
{
diff --git a/tests/PHPUnit/Integration/Log/LogTest.php b/tests/PHPUnit/Integration/Log/LogTest.php
index a3dbee3178..8fb10599d8 100644
--- a/tests/PHPUnit/Integration/Log/LogTest.php
+++ b/tests/PHPUnit/Integration/Log/LogTest.php
@@ -15,10 +15,8 @@ use Piwik\Container\ContainerFactory;
use Piwik\Container\StaticContainer;
use Piwik\Db;
use Piwik\Log;
-use Piwik\Plugins\TestPlugin\TestLoggingUtility;
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
-
-require_once PIWIK_INCLUDE_PATH . '/tests/resources/TestPluginLogClass.php';
+use Piwik\Tests\Integration\Log\Fixture\LoggerWrapper;
/**
* @group Core
@@ -30,7 +28,7 @@ class LogTest extends IntegrationTestCase
const STRING_MESSAGE_FORMAT = '[%tag%] %message%';
const STRING_MESSAGE_FORMAT_SPRINTF = "[%s] %s";
- public static $expectedExceptionOutput = '[Piwik\Tests\Integration\Log\LogTest] LogTest.php(122): dummy error message
+ public static $expectedExceptionOutput = '[Piwik\Tests\Integration\Log\LogTest] LogTest.php(120): dummy error message
dummy backtrace';
public static $expectedErrorOutput = '[Piwik\Tests\Integration\Log\LogTest] dummyerrorfile.php(145): Unknown error (102) - dummy error string
@@ -132,9 +130,11 @@ class LogTest extends IntegrationTestCase
{
Config::getInstance()->log['log_writers'] = array($backend);
- TestLoggingUtility::doLog(self::TESTMESSAGE);
+ LoggerWrapper::doLog(self::TESTMESSAGE);
+
+ $tag = 'Piwik\Tests\Integration\Log\Fixture\LoggerWrapper';
- $this->checkBackend($backend, self::TESTMESSAGE, $formatMessage = true, $tag = 'TestPlugin');
+ $this->checkBackend($backend, self::TESTMESSAGE, $formatMessage = true, $tag);
}
/**
@@ -157,9 +157,11 @@ class LogTest extends IntegrationTestCase
{
Config::getInstance()->log['log_writers'] = array($backend);
- TestLoggingUtility::doLog(" \n ".self::TESTMESSAGE."\n\n\n \n");
+ LoggerWrapper::doLog(" \n ".self::TESTMESSAGE."\n\n\n \n");
+
+ $tag = 'Piwik\Tests\Integration\Log\Fixture\LoggerWrapper';
- $this->checkBackend($backend, self::TESTMESSAGE, $formatMessage = true, $tag = 'TestPlugin');
+ $this->checkBackend($backend, self::TESTMESSAGE, $formatMessage = true, $tag);
}
private function checkBackend($backend, $expectedMessage, $formatMessage = false, $tag = false)