function ConfigActionsTest::testConfigActions

Same name in this branch
  1. 11.x core/modules/media/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\media\Kernel\ConfigActionsTest::testConfigActions()
  2. 11.x core/modules/language/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\language\Kernel\ConfigActionsTest::testConfigActions()
  3. 11.x core/modules/field/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\field\Kernel\ConfigActionsTest::testConfigActions()
  4. 11.x core/modules/contact/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\contact\Kernel\ConfigActionsTest::testConfigActions()
  5. 11.x core/modules/node/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\node\Kernel\ConfigActionsTest::testConfigActions()

File

core/modules/image/tests/src/Kernel/ConfigActionsTest.php, line 32

Class

ConfigActionsTest
@group image

Namespace

Drupal\Tests\image\Kernel

Code

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.