Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -0,0 +1,68 @@
<?php
namespace Drupal\Tests\tracker\Kernel\Migrate\d7;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use Drupal\Core\Database\Database;
/**
* Tests migration of tracker_node.
*
* @group tracker
*/
class MigrateTrackerNodeTest extends MigrateDrupal7TestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'node',
'text',
'tracker',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installEntitySchema('node');
$this->installConfig(static::$modules);
$this->installSchema('node', ['node_access']);
$this->installSchema('tracker', ['tracker_node', 'tracker_user']);
$this->executeMigrations([
'd7_user_role',
'd7_user',
'd7_node_type',
'd7_node:test_content_type',
'd7_tracker_node',
]);
}
/**
* Tests migration of tracker node table.
*/
public function testMigrateTrackerNode() {
$connection = Database::getConnection('default', 'migrate');
$num_rows = $connection
->select('tracker_node', 'tn')
->fields('tn', ['nid', 'published', 'changed'])
->countQuery()
->execute()
->fetchField();
$this->assertIdentical('1', $num_rows);
$tracker_nodes = $connection
->select('tracker_node', 'tn')
->fields('tn', ['nid', 'published', 'changed'])
->execute();
$row = $tracker_nodes->fetchAssoc();
$this->assertIdentical('1', $row['nid']);
$this->assertIdentical('1', $row['published']);
$this->assertIdentical('1421727536', $row['changed']);
}
}

View file

@ -0,0 +1,32 @@
<?php
namespace Drupal\Tests\tracker\Kernel\Migrate\d7;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Tests migration of Tracker settings to configuration.
*
* @group tracker
*/
class MigrateTrackerSettingsTest extends MigrateDrupal7TestBase {
public static $modules = ['tracker'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(['tracker']);
$this->executeMigration('d7_tracker_settings');
}
/**
* Tests migration of tracker's variables to configuration.
*/
public function testMigration() {
$this->assertIdentical(999, \Drupal::config('tracker.settings')->get('cron_index_limit'));
}
}

View file

@ -0,0 +1,68 @@
<?php
namespace Drupal\Tests\tracker\Kernel\Migrate\d7;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use Drupal\Core\Database\Database;
/**
* Tests migration of tracker_user.
*
* @group tracker
*/
class MigrateTrackerUserTest extends MigrateDrupal7TestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'node',
'text',
'tracker',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installEntitySchema('node');
$this->installConfig(static::$modules);
$this->installSchema('node', ['node_access']);
$this->installSchema('tracker', ['tracker_node', 'tracker_user']);
$this->executeMigrations([
'd7_user_role',
'd7_user',
'd7_node_type',
'd7_node:test_content_type',
'd7_tracker_node',
]);
}
/**
* Tests migration of tracker user table.
*/
public function testMigrateTrackerUser() {
$connection = Database::getConnection('default', 'migrate');
$num_rows = $connection
->select('tracker_user', 'tn')
->fields('tu', ['nid', 'uid', 'published', 'changed'])
->countQuery()
->execute()
->fetchField();
$this->assertIdentical('1', $num_rows);
$tracker_nodes = $connection
->select('tracker_user', 'tu')
->fields('tu', ['nid', 'uid', 'published', 'changed'])
->execute();
$row = $tracker_nodes->fetchAssoc();
$this->assertIdentical('1', $row['nid']);
$this->assertIdentical('2', $row['uid']);
$this->assertIdentical('1', $row['published']);
$this->assertIdentical('1421727536', $row['changed']);
}
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\tracker\Unit\Plugin\migrate\source\d7\TrackerNodeTest.
*/
namespace Drupal\Tests\tracker\Unit\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\tracker\Unit\Plugin\migrate\source\d7\TrackerUserTest.
*/
namespace Drupal\Tests\tracker\Unit\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;