function ConfigActionsTest::testConfigActions
Tests adding an image effect using the configuration action manager.
File
-
core/
modules/ image/ tests/ src/ Kernel/ ConfigActionsTest.php, line 42
Class
- ConfigActionsTest
- Tests Config Actions.
Namespace
Drupal\Tests\image\KernelCode
public function testConfigActions() : void {
$style = ImageStyle::load('large');
$this->assertCount(2, $style->getEffects());
$this->configActionManager
->applyAction('entity_method:image.style:addImageEffect', $style->getConfigDependencyName(), [
'id' => 'image_desaturate',
'weight' => 1,
]);
$this->assertCount(3, ImageStyle::load('large')->getEffects());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.