Commit bdb4e9d8 authored by NickWilde's avatar NickWilde Committed by Dave Reid

Issue #2862333 by NickWilde: Fixed test failure with Drupal 8.4.x.

parent a9f6ea87
......@@ -107,15 +107,12 @@ abstract class EntityEmbedTestBase extends WebTestBase {
}
/**
*
* Assert that the expected display plugins are available for the entity.
*/
public function assertAvailableDisplayPlugins(EntityInterface $entity, array $expected_plugins, $message = '') {
$plugin_options = $this->container->get('plugin.manager.entity_embed.display')
->getDefinitionOptionsForEntity($entity);
// @todo Remove the sorting so we can actually test return order.
ksort($plugin_options);
sort($expected_plugins);
$this->assertEqual(array_keys($plugin_options), $expected_plugins, $message);
$this->assertEqual([], array_diff($expected_plugins, array_keys($plugin_options)), $message);
}
}
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