'text' => 'Important!',
'priority' => AnnounceCommand::PRIORITY_ASSERTIVE,
],
],
];
} /**
* @covers \Drupal\Core\Ajax\AppendCommand
*/
public function testAppendCommand() { $command =
new AppendCommand('#page-title', '<p>New Text!</p>',
['my-setting' => 'setting'
]);
$expected =
[ 'command' => 'insert',
'method' => 'append',
'selector' => '#page-title',
'data' => '<p>New Text!</p>',
'settings' =>
['my-setting' => 'setting'
],
];
$this->
assertEquals($expected,
$command->
render());
}