Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/stolberg/web/core/modules/field_ui/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/stolberg/web/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\field_ui\Unit;

use Drupal\Tests\UnitTestCase;

/**
 * @coversDefaultClass \Drupal\field_ui\Element\FieldUiTable
 *
 * @group field_ui
 */
class FieldUiTableTest extends UnitTestCase {

  /**
   * @covers ::reduceOrder
   *
   * @dataProvider providerTestReduceOrder
   */
  public function testReduceOrder($array, $expected): void {
    $this->assertSame($expected, array_reduce($array, ['Drupal\field_ui\Element\FieldUiTable', 'reduceOrder']));
  }

  /**
   * Provides test data for testReduceOrder().
   */
  public static function providerTestReduceOrder() {
    return [
      'Flat' => [
        'array' => [
          [
            'name' => 'foo',
          ],
          [
            'name' => 'bar',
          ],
          [
            'name' => 'baz',
          ],
        ],
        'expected' => ['foo', 'bar', 'baz'],
      ],
      'Nested' => [
        'array' => [
          [
            'name' => 'foo',
            'children' => [
              [
                'name' => 'bar',
                'weight' => 0,
              ],
              [
                'name' => 'baz',
                'weight' => -1,
              ],
            ],
          ],
          [
            'name' => 'biz',
          ],
        ],
        'expected' => ['foo', 'baz', 'bar', 'biz'],
      ],
      'Nested no name key' => [
        'array' => [
          [
            'children' => [
              [
                'name' => 'foo',
                'weight' => -1,
              ],
              [
                'name' => 'bar',
                'weight' => 1,
              ],
              [
                'name' => 'baz',
                'weight' => 0,
              ],
            ],
          ],
          [
            'name' => 'biz',
          ],
        ],
        'expected' => ['foo', 'baz', 'bar', 'biz'],
      ],
    ];
  }

}

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