updated core from 8.4 to 8.5 : bug with login_destination
This commit is contained in:
@@ -7,8 +7,8 @@ package: Testing
|
||||
dependencies:
|
||||
- syslog
|
||||
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
# Information added by Drupal.org packaging script on 2018-03-07
|
||||
version: '8.5.0'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1515021228
|
||||
datestamp: 1520457825
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Drupal\Tests\syslog\Kernel;
|
||||
|
||||
use Drupal\KernelTests\KernelTestBase;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
/**
|
||||
* Test syslog logger functionality.
|
||||
@@ -54,4 +53,26 @@ class SyslogTest extends KernelTestBase {
|
||||
$this->assertEquals('My warning message.', $log[8]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test severity level logging.
|
||||
*
|
||||
* @covers ::log
|
||||
*/
|
||||
public function testSyslogSeverity() {
|
||||
/* @var \Drupal\Core\Config\Config $config */
|
||||
$config = $this->container->get('config.factory')->getEditable('syslog.settings');
|
||||
$config->set('format', '!type|!message|!severity');
|
||||
$config->save();
|
||||
|
||||
\Drupal::logger('my_module')->warning('My warning message.');
|
||||
|
||||
$log_filename = $this->container->get('file_system')->realpath('public://syslog.log');
|
||||
$logs = explode(PHP_EOL, file_get_contents($log_filename));
|
||||
$log = explode('|', $logs[0]);
|
||||
|
||||
$this->assertEquals('my_module', $log[0]);
|
||||
$this->assertEquals('My warning message.', $log[1]);
|
||||
$this->assertEquals('4', $log[2]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user