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:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Access\ViewOwnTrackerAccessCheck.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Access;
|
||||
|
||||
use Drupal\Core\Access\AccessResult;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Controller\TrackerPage.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Controller\TrackerUserRecent.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Controller\TrackerUserTab.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Plugin\Menu\UserTrackerTab.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Plugin\Menu;
|
||||
|
||||
use Drupal\Core\Menu\LocalTaskDefault;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Plugin\migrate\source\d7\TrackerNode.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Plugin\migrate\source\d7;
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Plugin\migrate\source\d7\TrackerUser.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Plugin\migrate\source\d7;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Plugin\views\argument\UserUid.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Plugin\views\argument;
|
||||
|
||||
use Drupal\comment\Plugin\views\argument\UserUid as CommentUserUid;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Plugin\views\filter\UserUid.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Plugin\views\filter;
|
||||
|
||||
use Drupal\user\Plugin\views\filter\Name;
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\Migrate\d7\MigrateTrackerNodeTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests\Migrate\d7;
|
||||
|
||||
use Drupal\migrate_drupal\Tests\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']);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\Migrate\d7\MigrateTrackerSettingsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests\Migrate\d7;
|
||||
|
||||
use Drupal\migrate_drupal\Tests\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'));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\Migrate\d7\MigrateTrackerUserTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests\Migrate\d7;
|
||||
|
||||
use Drupal\migrate_drupal\Tests\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']);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\TrackerNodeAccessTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests;
|
||||
|
||||
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\TrackerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests;
|
||||
|
||||
use Drupal\comment\CommentInterface;
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\Views\TrackerTestBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests\Views;
|
||||
|
||||
use Drupal\comment\Tests\CommentTestTrait;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\views\Tests\ViewTestBase;
|
||||
use Drupal\views\Tests\ViewTestData;
|
||||
use Drupal\comment\Entity\Comment;
|
||||
|
||||
/**
|
||||
* Base class for all tracker tests.
|
||||
|
@ -60,7 +56,7 @@ abstract class TrackerTestBase extends ViewTestBase {
|
|||
'status' => 1,
|
||||
));
|
||||
|
||||
$this->comment = entity_create('comment', array(
|
||||
$this->comment = Comment::create(array(
|
||||
'entity_id' => $this->node->id(),
|
||||
'entity_type' => 'node',
|
||||
'field_name' => 'comment',
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\Views\TrackerUserUidTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests\Views;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
Reference in a new issue