Unverified Commit 90c7d4c3 authored by larowlan's avatar larowlan
Browse files

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

parent 1671837e
......@@ -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.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment