/**
* @covers ::getConfiguration
*/
public function testGetConfiguration() { $this->
setupPluginCollection($this->
exactly(3
));
// The expected order matches $this->config.
$expected =
['banana', 'cherry', 'apple'
];
$config =
$this->defaultPluginCollection->
getConfiguration();
$this->
assertSame($expected,
array_keys($config), 'The order of the configuration is unchanged.'
);
$ids =
$this->defaultPluginCollection->
getInstanceIds();
$this->
assertSame($expected,
array_keys($ids), 'The order of the instances is unchanged.'
);
$this->defaultPluginCollection->
sort();
$config =
$this->defaultPluginCollection->
getConfiguration();
$this->
assertSame($expected,
array_keys($config), 'After sorting, the order of the configuration is unchanged.'
);
$ids =
$this->defaultPluginCollection->
getInstanceIds();
sort($expected);
$this->
assertSame($expected,
array_keys($ids), 'After sorting, the order of the instances is also sorted.'
);
}