Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/12park/web/modules/contrib/ctools/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/12park/web/modules/contrib/ctools/tests/src/Kernel/BlockDisplayVariantTest.php

<?php

namespace Drupal\Tests\ctools\Kernel;

use Prophecy\PhpUnit\ProphecyTrait;
use Drupal\ctools\Event\BlockVariantEvent;
use Drupal\ctools\Event\BlockVariantEvents;
use Drupal\ctools_block_display_test\Plugin\DisplayVariant\BlockDisplayVariant;
use Drupal\KernelTests\KernelTestBase;
use Prophecy\Argument;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

/**
 * @coversDefaultClass \Drupal\ctools\Plugin\DisplayVariant\BlockDisplayVariant
 * @group CTools
 */
class BlockDisplayVariantTest extends KernelTestBase {

  use ProphecyTrait;
  /**
   * {@inheritdoc}
   */
  protected static $modules = ['ctools', 'ctools_block_display_test', 'system', 'user'];

  /**
   * Tests that events are fired when manipulating a block variant.
   */
  public function testBlockDisplayVariantEvents() {
    /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher */
    $event_dispatcher = $this->prophesize(EventDispatcherInterface::class);
    // Swap in a mock event dispatcher so we can spy on method calls.
    $this->container->set('event_dispatcher', $event_dispatcher->reveal());

    $variant = BlockDisplayVariant::create(
      $this->container,
      [],
      'foobar',
      []
    );
    // Set up the expected calls to the event dispatcher.
    $event = Argument::type(BlockVariantEvent::class);

    $event_dispatcher->dispatch($event, BlockVariantEvents::ADD_BLOCK)
      ->shouldBeCalled();
    $event_dispatcher->dispatch($event, BlockVariantEvents::UPDATE_BLOCK)
      ->shouldBeCalled();
    $event_dispatcher->dispatch($event, BlockVariantEvents::DELETE_BLOCK)
      ->shouldBeCalled();

    $block_id = $variant->addBlock(['id' => 'system_powered_by_block']);
    $variant->updateBlock($block_id, []);
    $variant->removeBlock($block_id);
  }

}

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