Skip to content
Snippets Groups Projects
Verified Commit 90c7d4c3 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3154398 by neclimdul, quietone, alexpott: Migrations don't have an accessor for requirements

parent 1671837e
Branches
Tags
8 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage",!13Resolve #2903456
......@@ -417,6 +417,13 @@ public function getIdMap() {
return $this->idMapPlugin;
}
/**
* {@inheritDoc}
*/
public function getRequirements(): array {
return $this->requirements;
}
/**
* {@inheritdoc}
*/
......
......@@ -103,6 +103,13 @@ public function id();
*/
public function label();
/**
* Get a list of required plugin IDs.
*
* @returns string[]
*/
public function getRequirements(): array;
/**
* Returns the initialized source plugin.
*
......
......@@ -113,6 +113,19 @@ public function testRequirementsForMigrations() {
$migration->checkRequirements();
}
/**
* Tests getting requirement list.
*
* @covers ::getRequirements
*/
public function testGetMigrations() {
$migration = new TestMigration();
$requirements = ['test_a', 'test_b', 'test_c', 'test_d'];
$migration->setRequirements($requirements);
$this->assertArrayEquals($requirements, $migration->getRequirements());
}
/**
* Tests valid migration dependencies configuration returns expected values.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment