Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/c12park/web/modules/contrib/visitors/tests/src/Unit/

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/c12park/web/modules/contrib/visitors/tests/src/Unit/HookPageAttachmentsTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\visitors\Unit;

use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;

require_once __DIR__ . '/../../../visitors.module';

/**
 * Tests visitors_page_attachments.
 *
 * @group visitors
 */
class HookPageAttachmentsTest extends UnitTestCase {

  /**
   * The cron service.
   *
   * @var \Drupal\visitors\VisitorsPageAttachmentsInterface|\PHPUnit\Framework\MockObject\MockObject
   */
  protected $service;

  /**
   * {@inheritdoc}
   */
  protected function setUp(): void {
    parent::setUp();

    $container = new ContainerBuilder();

    $string_translation = $this->createMock('Drupal\Core\StringTranslation\TranslationInterface');
    $container->set('string_translation', $string_translation);

    $this->service = $this->createMock('Drupal\visitors\VisitorsPageAttachmentsInterface');
    $container->set('visitors.page_attachments', $this->service);

    \Drupal::setContainer($container);
  }

  /**
   * Tests visitors_page_attachments().
   */
  public function testVisitorsCron() {
    $page = [];
    $this->service->expects($this->once())
      ->method('pageAttachments')
      ->with($page);

    visitors_page_attachments($page);
  }

}

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