function AjaxCommandsTest::announceCommandProvider
Data provider for testAnnounceCommand().
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Ajax/ AjaxCommandsTest.php, line 106  
Class
- AjaxCommandsTest
 - Test coverage for various classes in the \Drupal\Core\Ajax namespace.
 
Namespace
Drupal\Tests\Core\AjaxCode
public function announceCommandProvider() {
  return [
    'no priority' => [
      'Things are going to change!',
      NULL,
      [
        'command' => 'announce',
        'text' => 'Things are going to change!',
      ],
    ],
    'polite priority' => [
      'Things are going to change!',
      'polite',
      [
        'command' => 'announce',
        'text' => 'Things are going to change!',
        'priority' => AnnounceCommand::PRIORITY_POLITE,
      ],
    ],
    'assertive priority' => [
      'Important!',
      'assertive',
      [
        'command' => 'announce',
        'text' => 'Important!',
        'priority' => AnnounceCommand::PRIORITY_ASSERTIVE,
      ],
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.