Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html_old/abg/web/modules/contrib/migrate_tools/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_old/abg/web/modules/contrib/migrate_tools/tests/src/Unit/MigrateToolsTest.php

<?php

namespace Drupal\Tests\migrate_tools\Unit;

use Drupal\migrate_tools\MigrateTools;
use Drupal\Tests\UnitTestCase;

/**
 * @coversDefaultClass \Drupal\migrate_tools\MigrateTools
 * @group migrate_tools
 */
class MigrateToolsTest extends UnitTestCase {

  /**
   * @covers ::buildIdList
   *
   * @dataProvider dataProviderIdList
   */
  public function testBuildIdList(array $options, array $expected): void {
    $results = MigrateTools::buildIdList($options);
    $this->assertEquals($results, $expected);
  }

  /**
   * Data provider for testBuildIdList.
   */
  public function dataProviderIdList(): array {
    $cases = [];
    $cases[] = [
      'options' => [],
      'expected' => [],
    ];
    $cases['single id'] = [
      'options' => [
        'idlist' => 123,
      ],
      'expected' => [[123]],
    ];
    $cases['multiple ids'] = [
      'options' => [
        'idlist' => '123, 456',
      ],
      'expected' => [
        [123], [456],
      ],
    ];
    $cases['default delimiter, composite key'] = [
      'options' => [
        'idlist' => '123:456',
      ],
      'expected' => [
        [123, 456],
      ],
    ];
    $cases['special delimiter, single'] = [
      'options' => [
        'idlist' => '123:456',
        'idlist-delimiter' => '~',
      ],
      'expected' => [
        ['123:456'],
      ],
    ];
    $cases['special delimiter, multiple'] = [
      'options' => [
        'idlist' => '123:456~987:654',
        'idlist-delimiter' => '~',
      ],
      'expected' => [
        ['123:456', '987:654'],
      ],
    ];
    $cases['space delimiter, multiple'] = [
      'options' => [
        'idlist' => '123:456 987:654',
        'idlist-delimiter' => ' ',
      ],
      'expected' => [
        ['123:456', '987:654'],
      ],
    ];
    return $cases;
  }

}

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