Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/german-vocational.cn/core/modules/migrate/tests/src/Unit/process/

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/german-vocational.cn/core/modules/migrate/tests/src/Unit/process/ConcatTest.php

<?php

/**
 * @file
 * Contains \Drupal\Tests\migrate\Unit\process\ConcatTest.
 */

namespace Drupal\Tests\migrate\Unit\process;

use Drupal\migrate\MigrateException;
use Drupal\migrate\Plugin\migrate\process\Concat;

/**
 * Tests the concat process plugin.
 *
 * @group migrate
 */
class ConcatTest extends MigrateProcessTestCase {

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    $this->plugin = new TestConcat();
    parent::setUp();
  }

  /**
   * Test concat works without a delimiter.
   */
  public function testConcatWithoutDelimiter() {
    $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
    $this->assertSame('foobar', $value);
  }

  /**
   * Test concat fails properly on non-arrays.
   */
  public function testConcatWithNonArray() {
    $this->setExpectedException(MigrateException::class);
    $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty');
  }

  /**
   * Test concat works without a delimiter.
   */
  public function testConcatWithDelimiter() {
    $this->plugin->setDelimiter('_');
    $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
    $this->assertSame('foo_bar', $value);
  }

}

class TestConcat extends Concat {

  public function __construct() {
  }

  /**
   * Set the delimiter.
   *
   * @param string $delimiter
   *   The new delimiter.
   */
  public function setDelimiter($delimiter) {
    $this->configuration['delimiter'] = $delimiter;
  }

}

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