You are here

public function DatetimeElementFormTest::providerUntrusted in Drupal 9

Data provider for ::testDatetimeElementUntrustedCallbacks().

Return value

string[][] Test cases.

File

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

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',
      ])),
    ],
  ];
}