function ImageTestBase::imageAttributesAsString
Same name in other branches
- 10 core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php \Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTestBase::imageAttributesAsString()
- 11.x core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php \Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTestBase::imageAttributesAsString()
Helper to format attributes.
Parameters
bool $reverse: Reverse attributes when printing them.
Return value
string
7 calls to ImageTestBase::imageAttributesAsString()
- ImageTestBase::testAlignment in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php - Tests alignment integration.
- ImageTestBase::testAltTextRequired in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php - Tests that alt text is required for images.
- ImageTestBase::testAttributeRetentionDuringUpcasting in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php - Ensures that attributes are retained on conversion.
- ImageTestBase::testImageArbitraryHtml in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php - Tests that arbitrary attributes are allowed via GHS.
- ImageTestBase::testImageCaption in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php - Ensures that images can have caption set.
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php, line 69
Class
- ImageTestBase
- @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image @group ckeditor5 @internal
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
protected function imageAttributesAsString($reverse = FALSE) {
$string = [];
foreach ($this->imageAttributes() as $key => $value) {
$string[] = $key . '="' . $value . '"';
}
if ($reverse) {
$string = array_reverse($string);
}
return implode(' ', $string);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.