public function LanguageContentSettingsNodeTest::testLanguageContent in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/LanguageContentSettingsNodeTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\LanguageContentSettingsNodeTest::testLanguageContent()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/LanguageContentSettingsNodeTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\LanguageContentSettingsNodeTest::testLanguageContent()
Tests migration of content language settings.
File
- modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc6/ LanguageContentSettingsNodeTest.php, line 40
Class
- LanguageContentSettingsNodeTest
- Tests migration of language content setting variables for nodes only.
Namespace
Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6Code
public function testLanguageContent() {
// Assert that non translatable nodes are not translatable.
$config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'page');
$this
->assertTrue($config
->isDefaultConfiguration());
$this
->assertFalse($config
->isLanguageAlterable());
$this
->assertSame($config
->getDefaultLangcode(), 'site_default');
$config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'story');
$this
->assertTrue($config
->isDefaultConfiguration());
$this
->assertFalse($config
->isLanguageAlterable());
$this
->assertSame($config
->getDefaultLangcode(), 'site_default');
// Assert that products are not translatable.
$config = ContentLanguageSettings::loadByEntityTypeBundle('commerce_product', 'default');
$this
->assertTrue($config
->isDefaultConfiguration());
$this
->assertFalse($config
->isLanguageAlterable());
$this
->assertSame($config
->getDefaultLangcode(), 'site_default');
$config = ContentLanguageSettings::loadByEntityTypeBundle('commerce_product', 'product');
$this
->assertTrue($config
->isDefaultConfiguration());
$this
->assertFalse($config
->isLanguageAlterable());
$this
->assertSame($config
->getDefaultLangcode(), 'site_default');
$config = ContentLanguageSettings::loadByEntityTypeBundle('commerce_product', 'product_kit');
$this
->assertTrue($config
->isDefaultConfiguration());
$this
->assertFalse($config
->isLanguageAlterable());
$this
->assertSame($config
->getDefaultLangcode(), 'site_default');
$config = ContentLanguageSettings::loadByEntityTypeBundle('commerce_product', 'ship');
$this
->assertTrue($config
->isDefaultConfiguration());
$this
->assertFalse($config
->isLanguageAlterable());
$this
->assertSame($config
->getDefaultLangcode(), 'site_default');
}