function DatetimeElementFormTest::providerUntrusted
Data provider for ::testDatetimeElementUntrustedCallbacks().
Return value
string[][] Test cases.
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Datetime/ DatetimeElementFormTest.php, line 178 
Class
- DatetimeElementFormTest
- Tests DatetimeElement functionality.
Namespace
Drupal\KernelTests\Core\DatetimeCode
public static 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. See https://www.drupal.org/node/3217966', Variable::callableToString([
        static::class,
        '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. See https://www.drupal.org/node/3217966', Variable::callableToString([
        static::class,
        'datetimeTimeCallback',
      ])),
    ],
  ];
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
