Issue #3097450 by longwave, RenatoG: Remove text.module BC layers
parent
c205bfdbaf
commit
ef9badf257
|
@ -45,33 +45,6 @@ class TextFieldTest extends UnitTestCase {
|
|||
$this->migration = $migration->reveal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the deprecated processFieldValues() method to test BC.
|
||||
*
|
||||
* @covers ::processFieldValues
|
||||
*
|
||||
* @depends testFilteredTextValueProcessPipeline
|
||||
*/
|
||||
public function testProcessFilteredTextFieldValues() {
|
||||
$field_info = [
|
||||
'widget_type' => 'text_textfield',
|
||||
];
|
||||
$this->plugin->processFieldValues($this->migration, 'body', $field_info);
|
||||
|
||||
$process = $this->migration->getProcess();
|
||||
$this->assertSame('sub_process', $process['plugin']);
|
||||
$this->assertSame('body', $process['source']);
|
||||
$this->assertSame('value', $process['process']['value']);
|
||||
|
||||
// Ensure that filter format IDs will be looked up in the filter format
|
||||
// migrations.
|
||||
$lookup = $process['process']['format'][2];
|
||||
$this->assertSame('migration_lookup', $lookup['plugin']);
|
||||
$this->assertContains('d6_filter_format', $lookup['migration']);
|
||||
$this->assertContains('d7_filter_format', $lookup['migration']);
|
||||
$this->assertSame('format', $lookup['source']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::defineValueProcessPipeline
|
||||
*/
|
||||
|
@ -95,35 +68,6 @@ class TextFieldTest extends UnitTestCase {
|
|||
$this->assertSame('format', $lookup['source']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the deprecated processFieldValues() method to test BC.
|
||||
*
|
||||
* @covers ::processFieldValues
|
||||
*
|
||||
* @depends testBooleanTextImplicitValueProcessPipeline
|
||||
*/
|
||||
public function testProcessBooleanTextImplicitValues() {
|
||||
$info = [
|
||||
'widget_type' => 'optionwidgets_onoff',
|
||||
'global_settings' => [
|
||||
'allowed_values' => "foo\nbar",
|
||||
],
|
||||
];
|
||||
$this->plugin->processFieldValues($this->migration, 'field', $info);
|
||||
|
||||
$expected = [
|
||||
'value' => [
|
||||
'plugin' => 'static_map',
|
||||
'source' => 'value',
|
||||
'default_value' => 0,
|
||||
'map' => [
|
||||
'bar' => 1,
|
||||
],
|
||||
],
|
||||
];
|
||||
$this->assertSame($expected, $this->migration->getProcess()['process']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::defineValueProcessPipeline
|
||||
*/
|
||||
|
@ -149,35 +93,6 @@ class TextFieldTest extends UnitTestCase {
|
|||
$this->assertSame($expected, $this->migration->getProcess()['process']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the deprecated processFieldValues() method to test BC.
|
||||
*
|
||||
* @covers ::processFieldValues
|
||||
*
|
||||
* @depends testBooleanTextExplicitValueProcessPipeline
|
||||
*/
|
||||
public function testProcessBooleanTextExplicitValues() {
|
||||
$info = [
|
||||
'widget_type' => 'optionwidgets_onoff',
|
||||
'global_settings' => [
|
||||
'allowed_values' => "foo|Foo\nbaz|Baz",
|
||||
],
|
||||
];
|
||||
$this->plugin->processFieldValues($this->migration, 'field', $info);
|
||||
|
||||
$expected = [
|
||||
'value' => [
|
||||
'plugin' => 'static_map',
|
||||
'source' => 'value',
|
||||
'default_value' => 0,
|
||||
'map' => [
|
||||
'baz' => 1,
|
||||
],
|
||||
],
|
||||
];
|
||||
$this->assertSame($expected, $this->migration->getProcess()['process']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::defineValueProcessPipeline
|
||||
*/
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\text\Unit\Plugin\migrate\field\d6;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \Drupal\text\Plugin\migrate\field\d6\TextField
|
||||
* @group text
|
||||
* @group legacy
|
||||
*/
|
||||
class TextFieldLegacyTest extends TextFieldTest {
|
||||
|
||||
/**
|
||||
* @covers ::processFieldValues
|
||||
* @expectedDeprecation Deprecated in Drupal 8.6.0, to be removed before Drupal 9.0.0. Use defineValueProcessPipeline() instead. See https://www.drupal.org/node/2944598.
|
||||
*/
|
||||
public function testProcessFilteredTextFieldValues($method = 'processFieldValues') {
|
||||
parent::testProcessFilteredTextFieldValues($method);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::processFieldValues
|
||||
* @expectedDeprecation Deprecated in Drupal 8.6.0, to be removed before Drupal 9.0.0. Use defineValueProcessPipeline() instead. See https://www.drupal.org/node/2944598.
|
||||
*/
|
||||
public function testProcessBooleanTextImplicitValues($method = 'processFieldValues') {
|
||||
parent::testProcessBooleanTextImplicitValues($method);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::processFieldValues
|
||||
* @expectedDeprecation Deprecated in Drupal 8.6.0, to be removed before Drupal 9.0.0. Use defineValueProcessPipeline() instead. See https://www.drupal.org/node/2944598.
|
||||
*/
|
||||
public function testProcessBooleanTextExplicitValues($method = 'processFieldValues') {
|
||||
parent::testProcessBooleanTextExplicitValues($method);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue