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

@ -0,0 +1,10 @@
id: node_template
label: Template test - node
migration_tags:
- Template Test
source:
plugin: empty
process:
src: barfoo
destination:
plugin: entity:node

View file

@ -0,0 +1,10 @@
id: other_template
label: Template with a different tag
migration_tags:
- Different Template Test
source:
plugin: empty
process:
src: raboof
destination:
plugin: entity:user

View file

@ -0,0 +1,10 @@
id: url_template
label: Template test - url
migration_tags:
- Template Test
source:
plugin: empty
process:
src: foobar
destination:
plugin: url_alias

View file

@ -0,0 +1,5 @@
name: 'Migration template test'
type: module
package: Testing
version: VERSION
core: 8.x

View file

@ -58,6 +58,13 @@ abstract class MigrateSqlSourceTestCase extends MigrateTestCase {
*/
protected $expectedResults = array();
/**
* Expected count of source rows.
*
* @var int
*/
protected $expectedCount = 0;
/**
* The source plugin instance under test.
*
@ -97,6 +104,7 @@ abstract class MigrateSqlSourceTestCase extends MigrateTestCase {
->method('getSourcePlugin')
->will($this->returnValue($plugin));
$this->source = $plugin;
$this->expectedCount = count($this->expectedResults);
}
/**
@ -106,6 +114,13 @@ abstract class MigrateSqlSourceTestCase extends MigrateTestCase {
$this->queryResultTest($this->source, $this->expectedResults);
}
/**
* Test the source returns the row count expected.
*/
public function testSourceCount() {
$this->assertEquals($this->source->count(), $this->expectedCount);
}
/**
* @param \Drupal\migrate\Row $row
* @param string $key

View file

@ -7,7 +7,6 @@
namespace Drupal\Tests\migrate\Unit;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Database\Connection;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\MigrateException;
@ -61,7 +60,7 @@ class TestSqlIdMap extends Sql implements \Iterator {
'not null' => FALSE,
);
default:
throw new MigrateException(SafeMarkup::format('@type not supported', array('@type' => $id_definition['type'])));
throw new MigrateException($id_definition['type'] . ' not supported');
}
}
}

View file

@ -19,12 +19,6 @@ class StaticMapTest extends MigrateProcessTestCase {
* {@inheritdoc}
*/
protected function setUp() {
$this->row = $this->getMockBuilder('Drupal\migrate\Row')
->disableOriginalConstructor()
->getMock();
$this->migrateExecutable = $this->getMockBuilder('Drupal\migrate\MigrateExecutable')
->disableOriginalConstructor()
->getMock();
$configuration['map']['foo']['bar'] = 'baz';
$this->plugin = new StaticMap($configuration, 'map', array());
parent::setUp();