installEntitySchema example

'path',
    'path_alias',
    'text',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installEntitySchema('node');
    $this->installEntitySchema('path_alias');
    $this->installConfig('node');
    $this->installSchema('node', ['node_access']);

    $this->migrateUsers(FALSE);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'language',
      'd7_node',
    ]);
  }

  
'language',
    'content_translation',
    'taxonomy',
    'text',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema('taxonomy_term');
    $this->executeMigrations([
      'language',
      'd7_taxonomy_vocabulary',
      'd7_language_content_taxonomy_vocabulary_settings',
    ]);
  }

  /** * Tests migration of 18ntaxonomy vocabulary settings. */
  public function testLanguageContentTaxonomy() {
    
'url_alter_test',
    'user',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->setUpCurrentUser(['uid' => 0]);
    $this->installEntitySchema('menu_link_content');

    // Ensure that the weight of module_link_content is higher than system.     // @see menu_link_content_install()     module_set_weight('menu_link_content', 1);
  }

  /** * Tests bubbleable metadata of menu links' outbound route/path processing. */
  public function testOutboundPathAndRouteProcessing() {
    $request_stack = \Drupal::requestStack();
    
'node',
    'field',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->migrateFields();

    $this->installEntitySchema('node');
    $this->installConfig(['node']);
    $this->installSchema('node', ['node_access']);
    $this->installSchema('system', ['sequences']);
    $this->executeMigration('language');
    $this->executeMigration('d6_field_instance_label_description_translation');
  }

  /** * {@inheritdoc} */
  public static function migrateDumpAlter(KernelTestBase $test) {
    

  protected $translationLangcode = 'af';

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installEntitySchema('entity_test_with_bundle');
    ConfigurableLanguage::createFromLangcode($this->translationLangcode)->save();

    $this->contentTranslationManager = $this->container->get('content_translation.manager');
  }

  /** * Tests that content translation fields are created upon module installation. */
  public function testFieldUpdates() {
    // The module ships a translatable bundle of the 'entity_test_with_bundle'     // entity type.
'locale',
    'path_alias',
    'statistics',
    'taxonomy',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema('block_content');
    $this->installConfig(['block']);
    $this->installConfig(['block_content']);

    $this->executeMigrations([
      'language',
      'd6_filter_format',
      'block_content_type',
      'block_content_body_field',
      'd6_custom_block',
      'd6_user_role',
      'd6_block',
      

  protected static $modules = ['system', 'views', 'user'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installConfig(['views']);
    $this->installEntitySchema('user');

    $this->state = $this->container->get('state');
    $this->entityTypeManager = $this->container->get('entity_type.manager');
  }

  /** * Tests that cacheability metadata is only calculated when needed. * * Determining the cacheability of a view is an expensive operation since it * requires all Views plugins and handlers to be initialized. For efficiency * reasons this should only be done if a view is being saved (either through * the UI or the API). The cacheability metadata is then stored in the view * config and is ready to use at runtime. * * It should not be calculated when a view is enabled through installing a * module, or by syncing configuration. * * @see \Drupal\views\Entity\View::addCacheMetadata() */

  protected static $modules = ['node', 'field', 'text', 'system', 'user'];

  /** * Set the default field storage backend for fields created during tests. */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema('user');

    // Set default storage backend.     $this->installConfig(['system', 'field']);
  }

  /** * Tests creating a content type during default config import. */
  public function testImportCreateDefault() {
    $node_type_id = 'default';

    
'workflows',
    'entity_test',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installSchema('node', 'node_access');
    $this->installEntitySchema('node');
    $this->installEntitySchema('entity_test');
    $this->installEntitySchema('user');
    $this->installEntitySchema('content_moderation_state');
    $this->installConfig('content_moderation');

    NodeType::create([
      'type' => 'example',
    ])->save();
    $workflow = $this->createEditorialWorkflow();
    $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example');
    $workflow->save();
  }

  protected $normalUser;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installSchema('system', ['sequences']);
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');

    // Create first UID1 so, the other users are not super-admin.     $this->createUser([], NULL, FALSE, ['uid' => 1]);
    $this->webUser = $this->createUser();
    $this->normalUser = $this->createUser(['views_test_data test permission']);

    ViewTestData::createTestViews(static::class['user_test_views']);
  }

  /** * Tests perm access plugin. */
/** * {@inheritdoc} */
  protected static $modules = ['file', 'image'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema('file');
    $this->executeMigrations([
      'user_picture_field',
      'user_picture_field_instance',
      'user_picture_entity_display',
    ]);
  }

  /** * Tests the Drupal 7 user picture to Drupal 8 entity display migration. */
  public function testUserPictureEntityDisplay() {
    

  protected $term1;

  /** * {@inheritdoc} */
  protected function setUp($import_test_views = TRUE): void {
    parent::setUp($import_test_views);

    $this->installEntitySchema('taxonomy_term');
    $this->installConfig(['filter']);

    /** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary */
    $vocabulary = $this->createVocabulary();
    $this->term1 = $this->createTerm($vocabulary);

    ViewTestData::createTestViews(static::class['taxonomy_test_views']);
  }

  /** * Tests the taxonomy field handler. */
'language',
    'config_translation',
    'user',
    'system',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema('user');
    $this->installEntitySchema('taxonomy_term');
    $this->installConfig(['taxonomy']);
  }

  /** * Tests rolling back configuration entity translations. */
  public function testConfigEntityRollback() {
    // We use vocabularies to demonstrate importing and rolling back     // configuration entities with translations. First, import vocabularies.     $vocabulary_data_rows = [
      [
'path_alias',
    'test_page_test',
    'user',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installEntitySchema('user');
    $this->installEntitySchema('menu_link_content');
    $this->installEntitySchema('path_alias');

    // Ensure that the weight of module_link_content is higher than system.     // @see menu_link_content_install()     module_set_weight('menu_link_content', 1);
  }

  /** * {@inheritdoc} */
  
'entity_test',
    'breakpoint',
    'responsive_image_test_module',
    'user',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema('entity_test');
  }

  /** * Tests integration with entity view display. */
  public function testEntityViewDisplayDependency() {
    // Create a responsive image style.     ResponsiveImageStyle::create([
      'id' => 'foo',
      'label' => 'Foo',
      'breakpoint_group' => 'responsive_image_test_module',
    ])
Home | Imprint | This part of the site doesn't use cookies.