'name' => 'my-data',
'value' =>
['key' => 'value'
],
];
$this->
assertEquals($expected,
$command->
render());
} /**
* @covers \Drupal\Core\Ajax\HtmlCommand
*/
public function testHtmlCommand() { $command =
new HtmlCommand('#page-title', '<p>New Text!</p>',
['my-setting' => 'setting'
]);
$expected =
[ 'command' => 'insert',
'method' => 'html',
'selector' => '#page-title',
'data' => '<p>New Text!</p>',
'settings' =>
['my-setting' => 'setting'
],
];
$this->
assertEquals($expected,
$command->
render());
}