FieldTypeDefaultsTest.php

Same filename in this branch
  1. 8.9.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
  2. 8.9.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php
Same filename and directory in other branches
  1. 9 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
  2. 9 core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php
  3. 10 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
  4. 10 core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php
  5. 11.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
  6. 11.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php

Namespace

Drupal\Tests\field\Unit\Plugin\migrate\process

File

core/modules/field/tests/src/Unit/Plugin/migrate/process/FieldTypeDefaultsTest.php

View source
<?php

namespace Drupal\Tests\field\Unit\Plugin\migrate\process;

use Drupal\field\Plugin\migrate\process\FieldTypeDefaults;
use Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase;

/**
 * Tests the deprecation of the field_type_defaults process plugin.
 *
 * @coversDefaultClass \Drupal\field\Plugin\migrate\process\FieldTypeDefaults
 * @group field
 * @group legacy
 */
class FieldTypeDefaultsTest extends MigrateProcessTestCase {
    
    /**
     * Tests that the field_type_defaults plugin triggers a deprecation error.
     *
     * @expectedDeprecation The field_type_defaults process plugin is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use d6_field_type_defaults or d7_field_type_defaults instead. See https://www.drupal.org/node/2944589.
     */
    public function testDeprecatedError() {
        $this->plugin = new FieldTypeDefaults([], 'field_type_defaults', []);
    }

}

Classes

Title Deprecated Summary
FieldTypeDefaultsTest Tests the deprecation of the field_type_defaults process plugin.

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