function DatetimeElementFormTest::providerUntrusted

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php \Drupal\KernelTests\Core\Datetime\DatetimeElementFormTest::providerUntrusted()
  2. 11.x core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php \Drupal\KernelTests\Core\Datetime\DatetimeElementFormTest::providerUntrusted()

Data provider for ::testDatetimeElementUntrustedCallbacks().

Return value

string[][] Test cases.

File

core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php, line 176

Class

DatetimeElementFormTest
Tests DatetimeElement functionality.

Namespace

Drupal\KernelTests\Core\Datetime

Code

public function providerUntrusted() : array {
    return [
        'untrusted date' => [
            'datetimeDateCallback',
            'datetimeTimeCallbackTrusted',
            sprintf('DateTime element #date_date_callbacks callbacks must be methods of a class that implements \\Drupal\\Core\\Security\\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in drupal:9.3.0 and will be removed in drupal:10.0.0. See https://www.drupal.org/node/3217966', Variable::callableToString([
                $this,
                'datetimeDateCallback',
            ])),
        ],
        'untrusted time' => [
            'datetimeDateCallbackTrusted',
            'datetimeTimeCallback',
            sprintf('DateTime element #date_time_callbacks callbacks must be methods of a class that implements \\Drupal\\Core\\Security\\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in drupal:9.3.0 and will be removed in drupal:10.0.0. See https://www.drupal.org/node/3217966', Variable::callableToString([
                $this,
                'datetimeTimeCallback',
            ])),
        ],
    ];
}

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