Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/strat/web/core/modules/image/tests/src/Kernel/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/strat/web/core/modules/image/tests/src/Kernel/ConfigActionsTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\image\Kernel;

use Drupal\Core\Config\Action\ConfigActionManager;
use Drupal\image\Entity\ImageStyle;
use Drupal\KernelTests\KernelTestBase;

/**
 * @group image
 */
class ConfigActionsTest extends KernelTestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = ['image', 'system'];

  private readonly ConfigActionManager $configActionManager;

  /**
   * {@inheritdoc}
   */
  protected function setUp(): void {
    parent::setUp();
    $this->installConfig(['image', 'system']);
    $this->configActionManager = $this->container->get('plugin.manager.config_action');
  }

  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());
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net