Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/pallets/web/core/modules/workflows/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/pallets/web/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php

<?php

namespace Drupal\Tests\workflows\Kernel;

use Drupal\KernelTests\KernelTestBase;
use Drupal\workflows\Entity\Workflow;

/**
 * Tests configuration dependencies in workflows.
 *
 * @coversDefaultClass \Drupal\workflows\Entity\Workflow
 *
 * @group workflows
 */
class WorkflowDependenciesTest extends KernelTestBase {

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

  /**
   * Tests \Drupal\workflows\Entity\Workflow::onDependencyRemoval().
   */
  public function testOnDependencyRemoval() {
    // Create a workflow that has a dependency on a third party setting.
    $workflow = Workflow::create(['id' => 'test3', 'type' => 'workflow_type_complex_test']);
    $workflow->setThirdPartySetting('workflow_third_party_settings_test', 'key', 'value');
    $workflow->save();
    $this->assertSame(['workflow_third_party_settings_test', 'workflow_type_test'], $workflow->getDependencies()['module']);

    // Uninstall workflow_third_party_settings_test to ensure
    // \Drupal\workflows\Entity\Workflow::onDependencyRemoval() works as
    // expected.
    \Drupal::service('module_installer')->uninstall(['node', 'workflow_third_party_settings_test']);
    /** @var \Drupal\workflows\WorkflowInterface $workflow */
    $workflow = \Drupal::entityTypeManager()->getStorage('workflow')->loadUnchanged($workflow->id());
    $this->assertSame(['workflow_type_test'], $workflow->getDependencies()['module']);
  }

}

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