ProcessField example


  public function testTransform($method$value$expected_value$migrate_exception = '', $plugin_not_found = FALSE) {
    if ($method) {
      $this->fieldPlugin->$method($this->row->reveal())->willReturn($expected_value);
    }
    $plugin = new ProcessField(['method' => $method]$value[]$this->fieldManager->reveal()$this->migration->reveal());

    if ($migrate_exception) {
      $this->expectException(MigrateException::class);
      $this->expectExceptionMessage($migrate_exception);
    }

    if ($plugin_not_found) {
      $exception = new PluginNotFoundException('foo');
      $this->fieldManager->getPluginIdFromFieldType()->willThrow($exception);
    }

    
Home | Imprint | This part of the site doesn't use cookies.