Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542

This commit is contained in:
Pantheon Automation 2015-08-27 12:03:05 -07:00 committed by Greg Anderson
parent 3b2511d96d
commit 81ccda77eb
2155 changed files with 54307 additions and 46870 deletions

View file

@ -11,6 +11,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\StringTranslation\TranslationWrapper;
/**
* Implements hook_help().
@ -41,9 +42,9 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
function dblog_menu_links_discovered_alter(&$links) {
if (\Drupal::moduleHandler()->moduleExists('search')) {
$links['dblog.search'] = array(
'title' => 'Top search phrases',
'title' => new TranslationWrapper('Top search phrases'),
'route_name' => 'dblog.search',
'description' => 'View most popular search phrases.',
'description' => new TranslationWrapper('View most popular search phrases.'),
'parent' => 'system.admin_reports',
);
}

View file

@ -0,0 +1,13 @@
id: d6_dblog_settings
label: Drupal 6 database logging configuration
migration_tags:
- Drupal 6
source:
plugin: variable
variables:
- dblog_row_limit
process:
row_limit: dblog_row_limit
destination:
plugin: config
config_name: dblog.settings

View file

@ -0,0 +1,13 @@
id: d7_dblog_settings
label: Drupal 7 database logging configuration
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- dblog_row_limit
process:
row_limit: dblog_row_limit
destination:
plugin: config
config_name: dblog.settings

View file

@ -207,7 +207,7 @@ class DbLogController extends ControllerBase {
$this->dateFormatter->format($dblog->timestamp, 'short'),
$message,
array('data' => $username),
Xss::filter($dblog->link),
SafeMarkup::xssFilter($dblog->link),
),
// Attributes for table row.
'class' => array(Html::getClass('dblog-' . $dblog->type), $classes[$dblog->severity]),
@ -285,7 +285,7 @@ class DbLogController extends ControllerBase {
),
array(
array('data' => $this->t('Operations'), 'header' => TRUE),
SafeMarkup::checkAdminXss($dblog->link),
array('data' => array('#markup' => $dblog->link)),
),
);
$build['dblog_table'] = array(

View file

@ -99,6 +99,9 @@ class DbLogFormInjectionTest extends KernelTestBase implements FormInterface {
*/
public function testLoggerSerialization() {
$form_state = new FormState();
// Forms are only serialized during POST requests.
$form_state->setRequestMethod('POST');
$form_state->setCached();
$form_builder = $this->container->get('form_builder');
$form_id = $form_builder->getFormId($this, $form_state);

View file

@ -0,0 +1,47 @@
<?php
/**
* @file
* Contains \Drupal\dblog\Tests\Migrate\d6\MigrateDblogConfigsTest.
*/
namespace Drupal\dblog\Tests\Migrate\d6;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to dblog.settings.yml.
*
* @group dblog
*/
class MigrateDblogConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('dblog');
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_dblog_settings');
}
/**
* Tests migration of dblog variables to dblog.settings.yml.
*/
public function testBookSettings() {
$config = $this->config('dblog.settings');
$this->assertIdentical(1000, $config->get('row_limit'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'dblog.settings', $config->get());
}
}

View file

@ -0,0 +1,44 @@
<?php
/**
* @file
* Contains \Drupal\dblog\Tests\Migrate\d7\MigrateDblogConfigsTest.
*/
namespace Drupal\dblog\Tests\Migrate\d7;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
/**
* Upgrade variables to dblog.settings.yml.
*
* @group dblog
*/
class MigrateDblogConfigsTest extends MigrateDrupal7TestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['dblog'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(static::$modules);
$this->loadDumps(['Variable.php']);
$this->executeMigration('d7_dblog_settings');
}
/**
* Tests migration of dblog variables to dblog.settings.yml.
*/
public function testDblogSettings() {
$config = $this->config('dblog.settings');
$this->assertIdentical(1000, $config->get('row_limit'));
}
}

View file

@ -34,7 +34,7 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
*
* @var array
*/
public static $modules = array('dblog', 'dblog_test_views');
public static $modules = array('dblog', 'dblog_test_views', 'user');
/**
* {@inheritdoc}