function DateElementTest::testProcessDate

@covers ::processDate @group legacy

File

core/tests/Drupal/Tests/Core/Render/Element/DateElementTest.php, line 19

Class

DateElementTest
@coversDefaultClass \Drupal\Core\Render\Element\Date @group Render

Namespace

Drupal\Tests\Core\Render\Element

Code

public function testProcessDate() : void {
    $element = [
        '#attributes' => [
            'type' => 'date',
        ],
        '#date_date_format' => 'Y-m-d',
    ];
    $complete_form = [];
    $this->expectDeprecation('Drupal\\Core\\Render\\Element\\Date::processDate() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. There is no replacement. See https://www.drupal.org/node/3258267');
    Date::processDate($element, $this->createMock(FormStateInterface::class), $complete_form);
}

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