Skip to content

Commit

Permalink
Fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jan 9, 2025
1 parent 51a6e7b commit 8c148c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/migrate_plus/data_parser/LocalistJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function getSourceData(string $url, string|int $item_selector = ''): a
* Paged url results.
*/
protected static function getPagedUrls(string $url): array {
$query = parse_url($url, PHP_URL_QUERY);
$query = parse_url($url, PHP_URL_QUERY) ?: '';
$base_url = trim(str_replace($query, '', $url), '?');
parse_str($query, $query_parts);

Expand Down
3 changes: 3 additions & 0 deletions tests/src/Kernel/Form/StanfordMigrateCsvImportFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Drupal\migrate_plus\Entity\MigrationInterface;
use Drupal\Tests\stanford_migrate\Kernel\StanfordMigrateKernelTestBase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

/**
* Class StanfordMigrateCsvImportFormTest.
Expand Down Expand Up @@ -130,6 +131,8 @@ protected function setMigrationRequest(MigrationInterface $migration) {
'migration' => $migration,
];
$request = new Request([], [], $attributes);
$session = $this->createMock(SessionInterface::class);
$request->setSession($session);
\Drupal::requestStack()->push($request);
}

Expand Down

0 comments on commit 8c148c5

Please sign in to comment.