unset($actual_form['visibility'
],
$actual_form['visibility_tabs'
]);
$this->
assertEquals($expected_form,
$actual_form, 'Only the expected form elements were present.'
);
$expected_build =
[ '#children' => 'My custom display message.',
];
// Ensure the build array is proper.
$this->
assertSame($expected_build,
$display_block->
build(), 'The plugin returned the appropriate build array.'
);
// Ensure the machine name suggestion is correct. In truth, this is actually
// testing BlockBase's implementation, not the interface itself.
$this->
assertSame('displaymessage',
$display_block->
getMachineNameSuggestion(), 'The plugin returned the expected machine name suggestion.'
);
}}