public function testAnnounceCommand($message,
$priority, array
$expected) { if ($priority === NULL
) { $command =
new AnnounceCommand($message);
} else { $command =
new AnnounceCommand($message,
$priority);
} $expected_assets =
new AttachedAssets();
$expected_assets->
setLibraries(['core/drupal.announce'
]);
$this->
assertEquals($expected_assets,
$command->
getAttachedAssets());
$this->
assertSame($expected,
$command->
render());
} /**
* Data provider for testAnnounceCommand().
*/
public function announceCommandProvider() { return [ 'no priority' =>
[ 'Things are going to change!',
NULL,
[