get_resources example

    $executable = $this->createMock(MigrateExecutableInterface::class);
    $row = new Row([][]);

    // Return the downloaded file's local URI.     $value = [
      'http://drupal.org/favicon.ico',
      $destination_uri,
    ];

    // Assert that number of stream resources in use is the same before and     // after the download.     $initial_count = count(get_resources('stream'));
    $return = $plugin->transform($value$executable$row, 'foo');
    $this->assertCount($initial_countget_resources('stream'));
    return $return;
  }

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