function LanguageContentSettingsTest::providerSource

Same name in this branch
  1. 10 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d6\LanguageContentSettingsTest::providerSource()
Same name and namespace in other branches
  1. 9 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d6\LanguageContentSettingsTest::providerSource()
  2. 9 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d7\LanguageContentSettingsTest::providerSource()
  3. 8.9.x core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d6\LanguageContentSettingsTest::providerSource()
  4. 8.9.x core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d7\LanguageContentSettingsTest::providerSource()
  5. 11.x core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d6\LanguageContentSettingsTest::providerSource()
  6. 11.x core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php \Drupal\Tests\language\Kernel\Plugin\migrate\source\d7\LanguageContentSettingsTest::providerSource()

File

core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php, line 26

Class

LanguageContentSettingsTest
Tests menu source plugin.

Namespace

Drupal\Tests\language\Kernel\Plugin\migrate\source\d7

Code

public static function providerSource() {
  $tests = [];
  // The source data.
  $tests[0]['source_data']['node_type'] = [
    [
      'type' => 'article',
      'name' => 'Article',
      'base' => 'node_content',
      'module' => 'node',
      'description' => 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.',
      'help' => 'Help text for articles',
      'has_title' => 1,
      'title_label' => 'Title',
      'custom' => 1,
      'modified' => 1,
      'locked' => 0,
      'disabled' => 0,
      'orig_type' => 'article',
    ],
    [
      'type' => 'blog',
      'name' => 'Blog entry',
      'base' => 'blog',
      'module' => 'blog',
      'description' => 'Use for multi-user blogs. Every user gets a personal blog.',
      'help' => 'Blog away, good sir!',
      'has_title' => 1,
      'title_label' => 'Title',
      'custom' => 0,
      'modified' => 1,
      'locked' => 1,
      'disabled' => 0,
      'orig_type' => 'blog',
    ],
  ];
  foreach ($tests[0]['source_data']['node_type'] as $node_type) {
    $tests[0]['expected_data'][] = [
      'type' => $node_type['type'],
      'language_content_type' => NULL,
      'i18n_lock_node' => 0,
    ];
  }
  return $tests;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.