public function AjaxCommandsTest::announceCommandProvider in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php \Drupal\Tests\Core\Ajax\AjaxCommandsTest::announceCommandProvider()
- 9 core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php \Drupal\Tests\Core\Ajax\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,
],
],
];
}