Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / node / tests / src / Kernel / Migrate / d7 / MigrateNodeDeriverTest.php
1 <?php
2
3 namespace Drupal\Tests\node\Kernel\Migrate\d7;
4
5 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
6
7 /**
8  * Test D7NodeDeriver.
9  *
10  * @group migrate_drupal_7
11  */
12 class MigrateNodeDeriverTest extends MigrateDrupal7TestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public static $modules = ['node'];
18
19   /**
20    * Test node translation migrations with translation disabled.
21    */
22   public function testNoTranslations() {
23     // Without content_translation, there should be no translation migrations.
24     $migrations = $this->container->get('plugin.manager.migration')->createInstances('d7_node_translation');
25     $this->assertEmpty($migrations);
26   }
27
28   /**
29    * Test node translation migrations with translation enabled.
30    */
31   public function testTranslations() {
32     // With content_translation, there should be translation migrations for
33     // each content type.
34     $this->enableModules(['language', 'content_translation', 'filter']);
35     $this->assertTrue($this->container->get('plugin.manager.migration')->hasDefinition('d7_node_translation:article'), "Node translation migrations exist after content_translation installed");
36   }
37
38 }