Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -67,7 +67,7 @@ abstract class ForumBreadcrumbBuilderBase implements BreadcrumbBuilderInterface
*/
public function build(RouteMatchInterface $route_match) {
$breadcrumb = new Breadcrumb();
$breadcrumb->setCacheContexts(['route']);
$breadcrumb->addCacheContexts(['route']);
$links[] = Link::createFromRoute($this->t('Home'), '<front>');

View file

@ -224,7 +224,6 @@ class ForumController extends ControllerBase {
'#sortby' => $config->get('topics.order'),
'#forums_per_page' => $config->get('topics.page_limit'),
);
$build['#attached']['library'][] = 'forum/forum.index';
if (empty($term->forum_container->value)) {
$build['#attached']['feed'][] = array('taxonomy/term/' . $term->id() . '/feed', 'RSS - ' . $term->getName());
}

View file

@ -87,9 +87,9 @@ class Overview extends OverviewTerms {
unset($form['actions']['reset_alphabetical']);
// Use the existing taxonomy overview submit handler.
$form['terms']['#empty'] = $this->t('No containers or forums available. <a href="@container">Add container</a> or <a href="@forum">Add forum</a>.', array(
'@container' => $this->url('forum.add_container'),
'@forum' => $this->url('forum.add_forum')
$form['terms']['#empty'] = $this->t('No containers or forums available. <a href=":container">Add container</a> or <a href=":forum">Add forum</a>.', array(
':container' => $this->url('forum.add_container'),
':forum' => $this->url('forum.add_forum')
));
return $form;
}

View file

@ -76,9 +76,9 @@ class ForumUninstallValidator implements ModuleUninstallValidatorInterface {
$vocabulary = $this->getForumVocabulary();
if ($this->hasTermsForVocabulary($vocabulary)) {
if ($vocabulary->access('view')) {
$reasons[] = $this->t('To uninstall Forum, first delete all <a href="@url">%vocabulary</a> terms', [
$reasons[] = $this->t('To uninstall Forum, first delete all <a href=":url">%vocabulary</a> terms', [
'%vocabulary' => $vocabulary->label(),
'@url' => $vocabulary->url('overview-form'),
':url' => $vocabulary->url('overview-form'),
]);
}
else {

View file

@ -83,6 +83,7 @@ class ForumTest extends WebTestBase {
protected function setUp() {
parent::setUp();
$this->drupalPlaceBlock('system_breadcrumb_block');
$this->drupalPlaceBlock('page_title_block');
// Create users.
$this->adminUser = $this->drupalCreateUser(array(

View file

@ -20,9 +20,7 @@ class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
/**
* Modules to enable.
*
* @var array
* {@inheritdoc}
*/
public static $modules = array('comment', 'forum', 'taxonomy');
@ -31,11 +29,7 @@ class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
*/
protected function setUp() {
parent::setUp();
$this->prepareMigrations(array(
'd6_taxonomy_vocabulary' => array(
array(array(1), array('vocabulary_1_i_0_')),
)
));
$this->executeMigration('d6_taxonomy_vocabulary');
$this->executeMigration('d6_forum_settings');
}

View file

@ -0,0 +1,54 @@
<?php
/**
* @file
* Contains \Drupal\forum\Tests\d7\MigrateForumSettingsTest.
*/
namespace Drupal\forum\Tests\Migrate\d7;
use Drupal\migrate\Entity\Migration;
use Drupal\migrate\MigrateExecutable;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
/**
* Tests migration of Forum's variables to configuration.
*
* @group forum
*/
class MigrateForumSettingsTest extends MigrateDrupal7TestBase {
// Don't alphabetize these. They're in dependency order.
public static $modules = [
'comment',
'field',
'filter',
'text',
'node',
'taxonomy',
'forum',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('d7_taxonomy_vocabulary');
$this->executeMigration('d7_forum_settings');
}
/**
* Tests the migration of Forum's settings to configuration.
*/
public function testForumSettingsMigration() {
$config = $this->config('forum.settings');
$this->assertIdentical(9, $config->get('block.active.limit'));
$this->assertIdentical(4, $config->get('block.new.limit'));
$this->assertIdentical(10, $config->get('topics.hot_threshold'));
$this->assertIdentical(25, $config->get('topics.page_limit'));
$this->assertIdentical(1, $config->get('topics.order'));
$this->assertIdentical('forums', $config->get('vocabulary'));
}
}