Update to Drupal 8.2.2. For more information, see https://www.drupal.org/project/drupal/releases/8.2.2
This commit is contained in:
parent
23ffed3665
commit
507b45a0ed
378 changed files with 11434 additions and 5542 deletions
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\tracker\Kernel\Plugin\migrate\source\d7;
|
||||
|
||||
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
|
||||
|
||||
/**
|
||||
* Tests D7 tracker node source plugin.
|
||||
*
|
||||
* @covers Drupal\tracker\Plugin\migrate\source\d7\TrackerNode
|
||||
*
|
||||
* @group tracker
|
||||
*/
|
||||
class TrackerNodeTest extends MigrateSqlSourceTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['tracker', 'migrate_drupal'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function providerSource() {
|
||||
$tests = [];
|
||||
|
||||
// The source data.
|
||||
$tests[0]['database']['tracker_node'] = [
|
||||
[
|
||||
'nid' => '2',
|
||||
'published' => '1',
|
||||
'changed' => '1421727536',
|
||||
]
|
||||
];
|
||||
|
||||
// The expected results are identical to the source data.
|
||||
$tests[0]['expected_results'] = $tests[0]['database']['tracker_node'];
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\tracker\Kernel\Plugin\migrate\source\d7;
|
||||
|
||||
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
|
||||
|
||||
/**
|
||||
* Tests D7 tracker user source plugin.
|
||||
*
|
||||
* @covers Drupal\tracker\Plugin\migrate\source\d7\TrackerUser
|
||||
*
|
||||
* @group tracker
|
||||
*/
|
||||
class TrackerUserTest extends MigrateSqlSourceTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['tracker', 'migrate_drupal'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function providerSource() {
|
||||
$tests = [];
|
||||
|
||||
// The source data.
|
||||
$tests[0]['database']['tracker_user'] = [
|
||||
[
|
||||
'nid' => '1',
|
||||
'uid' => '2',
|
||||
'published' => '1',
|
||||
'changed' => '1421727536',
|
||||
]
|
||||
];
|
||||
|
||||
// The expected results are identical to the source data.
|
||||
$tests[0]['expected_results'] = $tests[0]['database']['tracker_user'];
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\tracker\Unit\Plugin\migrate\source\d7;
|
||||
|
||||
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
|
||||
|
||||
/**
|
||||
* Tests D7 tracker node source plugin.
|
||||
*
|
||||
* @group tracker
|
||||
*/
|
||||
class TrackerNodeTest extends MigrateSqlSourceTestCase {
|
||||
|
||||
const PLUGIN_CLASS = 'Drupal\tracker\Plugin\migrate\source\d7\TrackerNode';
|
||||
|
||||
protected $migrationConfiguration = [
|
||||
'id' => 'test',
|
||||
'source' => [
|
||||
'plugin' => 'd7_tracker_node',
|
||||
],
|
||||
];
|
||||
|
||||
protected $expectedResults = [
|
||||
[
|
||||
'nid' => '2',
|
||||
'published' => '1',
|
||||
'changed' => '1421727536',
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
$this->databaseContents['tracker_node'] = $this->expectedResults;
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\tracker\Unit\Plugin\migrate\source\d7;
|
||||
|
||||
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
|
||||
|
||||
/**
|
||||
* Tests D7 tracker user source plugin.
|
||||
*
|
||||
* @group tracker
|
||||
*/
|
||||
class TrackerUserTest extends MigrateSqlSourceTestCase {
|
||||
|
||||
const PLUGIN_CLASS = 'Drupal\tracker\Plugin\migrate\source\d7\TrackerUser';
|
||||
|
||||
protected $migrationConfiguration = [
|
||||
'id' => 'test',
|
||||
'source' => [
|
||||
'plugin' => 'd7_tracker_user',
|
||||
],
|
||||
];
|
||||
|
||||
protected $expectedResults = [
|
||||
[
|
||||
'nid' => '1',
|
||||
'uid' => '2',
|
||||
'published' => '1',
|
||||
'changed' => '1421727536',
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
$this->databaseContents['tracker_user'] = $this->expectedResults;
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue