defineValueProcessPipeline example

'to_format' => $to_format,
          'source' => 'value2',
        ];
      }
    }
    $migration->expects($this->once())
      ->method('mergeProcessOfProperty')
      ->with('field_date', $pipeline)
      ->willReturn($migration);

    $plugin = new DateField([], '', []);
    $plugin->defineValueProcessPipeline($migration, 'field_date', $data);
  }

  /** * Provides data for testDefineValueProcessPipeline(). */
  public function providerTestDefineValueProcessPipeline() {
    return [
      [['type' => 'date'], 'Y-m-d\TH:i:s', 'Y-m-d\TH:i:s'],
      [['type' => 'datestamp'], 'U', 'U'],
      [['type' => 'datetime'], 'Y-m-d H:i:s', 'Y-m-d\TH:i:s'],
      [
        [
$this->migration = $migration->reveal();
  }

  /** * @covers ::defineValueProcessPipeline */
  public function testFilteredTextValueProcessPipeline() {
    $field_info = [
      'widget_type' => 'text_textfield',
    ];
    $this->plugin->defineValueProcessPipeline($this->migration, 'body', $field_info);

    $process = $this->migration->getProcess();
    $this->assertSame('sub_process', $process['plugin']);
    $this->assertSame('body', $process['source']);
    $this->assertSame('value', $process['process']['value']);

    // Ensure that filter format IDs will be looked up in the filter format     // migrations.     $lookup = $process['process']['format'][2];
    $this->assertSame('migration_lookup', $lookup['plugin']);
    $this->assertContains('d6_filter_format', $lookup['migration']);
    
Home | Imprint | This part of the site doesn't use cookies.