Problem/Motivation

This issue is specifically to add tests for #2553311: Drupal file migrations need to urlencode paths. That patch is rather trivial and its needed to make it easier for migraters but is held up by the lack of a test. And further, there isn't consensus on how to write test for that. Therefore, this issue is created, in the hope that that #2553311: Drupal file migrations need to urlencode paths can be committed.

Proposed resolution

Write test.

Remaining tasks

Decide if it can be done and how.

phenaproxima suggested creating a stream wrapper which will simulate the web server.
mikeryan asked that since migration tests use KernelTestBase then we can't test anything involving http://.

Comments

quietone created an issue. See original summary.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mikeryan’s picture

Title: Add test for urlencoding of Drupal file migrations » Figure out how to test migration of remote (http://) files
Related issues: +#2695297: Refactor EntityFile and use process plugins instead

The root issue here was figuring out how to test migration of remote (as in http://...) files - since the urlencode functionality was embedded in the file destination and only invoked with remote files, we faced the issue in that context. #2695297: Refactor EntityFile and use process plugins instead is separating urlencoding and file copying into separate process plugins, so is able to unit test urlencoding with URL strings without actually copying the files. But, we'd still like a means to test the file copy plugin with remote files.

chx’s picture

Status: Active » Closed (duplicate)