private function XBBCodeStandardTest::checkMarkup in Extensible BBCode 8.3
Same name and namespace in other branches
- 4.0.x standard/tests/src/Kernel/XBBCodeStandardTest.php \Drupal\Tests\xbbcode_standard\Kernel\XBBCodeStandardTest::checkMarkup()
A variant of check_markup that returns the full element.
This is needed to check the #attached key.
Parameters
string $text: The input text.
string $format_id: The format ID.
Return value
array The render array representing the processed text.
1 call to XBBCodeStandardTest::checkMarkup()
- XBBCodeStandardTest::testTags in standard/
tests/ src/ Kernel/ XBBCodeStandardTest.php - Test all of the tags installed by this module.
File
- standard/
tests/ src/ Kernel/ XBBCodeStandardTest.php, line 272
Class
- XBBCodeStandardTest
- Class XBBCodeStandardTest.
Namespace
Drupal\Tests\xbbcode_standard\KernelCode
private function checkMarkup($text, $format_id) : array {
$build = [
'#type' => 'processed_text',
'#text' => $text,
'#format' => $format_id,
'#filter_types_to_skip' => [],
'#langcode' => '',
];
Drupal::service('renderer')
->renderPlain($build);
return $build;
}