function FormatDateTest::testDeprecatedTimezoneConfigurationKey

Tests that "timezone" configuration key triggers deprecation error.

@covers ::transform

@dataProvider providerTestDeprecatedTimezoneConfigurationKey

@group legacy @expectedDeprecation Configuration key "timezone" is deprecated in 8.4.x and will be removed before Drupal 9.0.0, use "from_timezone" and "to_timezone" instead. See https://www.drupal.org/node/2885746

File

core/modules/migrate/tests/src/Unit/process/FormatDateTest.php, line 87

Class

FormatDateTest
Tests the format date process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testDeprecatedTimezoneConfigurationKey($configuration, $value, $expected) {
    $this->plugin = new FormatDate($configuration, 'test_format_date', []);
    $actual = $this->plugin
        ->transform($value, $this->migrateExecutable, $this->row, 'field_date');
    $this->assertEquals($expected, $actual);
}

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