Skip to content

Commit

Permalink
8.5.1
Browse files Browse the repository at this point in the history
- Refactored to Fetch pages when getting source data for localist json
  • Loading branch information
pookmish committed Aug 25, 2023
1 parent 4f9cccc commit c57696b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Stanford Migrate

8.5.1
--------------------------------------------------------------------------------
_Release Date: 2023-08-23_

- Fetch pages when getting source data for localist json

8.5.0
--------------------------------------------------------------------------------
_Release Date: 2023-08-23_
Expand Down
2 changes: 1 addition & 1 deletion stanford_migrate.info.yml
Expand Up @@ -3,7 +3,7 @@ description: 'Adds more functionality to migrate and migrate plus modules'
type: module
core_version_requirement: ^9 || ^10
package: 'Stanford'
version: 8.5.0
version: 8.5.1
dependencies:
- drupal:migrate
- empty_fields:empty_fields
Expand Down
Expand Up @@ -25,7 +25,13 @@ public function testJsonParser() {
$plugin = new TestLocalistJson(['urls' => []], '', []);
$this->assertEmpty($plugin->getUrls());

$plugin = new TestLocalistJson(['urls' => ['foobar', 'barbaz', 'bazbar']], '', []);
$plugin = new TestLocalistJson([
'urls' => [
'foobar',
'barbaz',
'bazbar',
],
], '', []);
$expected = [
'foobar?pp=100&page=1',
'barbaz?pp=100&page=1',
Expand Down Expand Up @@ -63,7 +69,11 @@ public function getClientResponse($method, $uri, array $options = []) {
class TestLocalistJson extends LocalistJson {

public function getUrls() {
return $this->urls;
$urls = [];
foreach ($this->urls as $url) {
$urls = [...$urls, ...self::getPagedUrls($url)];
}
return $urls;
}

}

0 comments on commit c57696b

Please sign in to comment.