More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / tests / Drupal / Tests / Component / Plugin / StubFallbackPluginManager.php
1 <?php
2
3 namespace Drupal\Tests\Component\Plugin;
4
5 use Drupal\Component\Plugin\FallbackPluginManagerInterface;
6 use Drupal\Component\Plugin\PluginManagerBase;
7
8 /**
9  * Stubs \Drupal\Component\Plugin\FallbackPluginManagerInterface.
10  *
11  * We have to stub \Drupal\Component\Plugin\FallbackPluginManagerInterface for
12  * \Drupal\Tests\Component\Plugin\PluginManagerBaseTest so that we can
13  * implement ::getFallbackPluginId().
14  *
15  * We do this so we can have it just return the plugin ID passed to it, with
16  * '_fallback' appended.
17  */
18 class StubFallbackPluginManager extends PluginManagerBase implements FallbackPluginManagerInterface {
19
20   /**
21    * {@inheritdoc}
22    */
23   public function getFallbackPluginId($plugin_id, array $configuration = []) {
24     // Minimally implement getFallbackPluginId so that we can test it.
25     return $plugin_id . '_fallback';
26   }
27
28 }