Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor1/web/core/tests/Drupal/Tests/Core/DefaultContent/

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/rocksensor1/web/core/tests/Drupal/Tests/Core/DefaultContent/FinderTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\Core\DefaultContent;

use Drupal\Component\FileSystem\FileSystem;
use Drupal\Core\DefaultContent\Finder;
use Drupal\Core\DefaultContent\ImportException;
use Drupal\Tests\UnitTestCase;

/**
 * @covers \Drupal\Core\DefaultContent\Finder
 * @group DefaultContent
 */
class FinderTest extends UnitTestCase {

  /**
   * Tests that any discovered entity data is sorted into dependency order.
   */
  public function testFoundDataIsInDependencyOrder(): void {
    $finder = new Finder(__DIR__ . '/../../../../fixtures/default_content');

    $expected_order = [
      // First is the author of the node.
      '94503467-be7f-406c-9795-fc25baa22203',
      // Next, the taxonomy term referenced by the node.
      '550f86ad-aa11-4047-953f-636d42889f85',
      // Then we have the node itself, since it has no other dependencies.
      'e1714f23-70c0-4493-8e92-af1901771921',
      // Finally, the menu link to the node.
      '3434bd5a-d2cd-4f26-bf79-a7f6b951a21b',
    ];
    $this->assertSame($expected_order, array_slice(array_keys($finder->data), 0, 4));
  }

  /**
   * Tests that files without UUIDs will raise an exception.
   */
  public function testExceptionIfNoUuid(): void {
    $dir = FileSystem::getOsTemporaryDirectory();
    $this->assertIsString($dir);
    /** @var string $dir */
    file_put_contents($dir . '/no-uuid.yml', '_meta: {}');

    $this->expectException(ImportException::class);
    $this->expectExceptionMessage("$dir/no-uuid.yml does not have a UUID.");
    new Finder($dir);
  }

}

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