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