3 namespace Drupal\views\Tests;
5 use Drupal\views\Plugin\views\PluginBase;
8 * Wraps the plugin base class to be able to instantiate it.
10 * @see \Drupal\views\Plugin\views\PluginBase.
12 class TestHelperPlugin extends PluginBase {
15 * Stores the defined options.
19 protected $definedOptions = [];
22 * Calls the protected method setOptionDefaults().
24 * @see \Drupal\views\Plugin\views\PluginBase::setOptionDefaults()
26 public function testSetOptionDefaults(&$storage, $options, $level = 0) {
27 $this->setOptionDefaults($storage, $options, $level);
31 * Allows to set the defined options.
33 * @param array $options
37 public function setDefinedOptions($options) {
38 $this->definedOptions = $options;
46 protected function defineOptions() {
47 // Normally we provide a limited set of options, but for testing purposes we
48 // make it possible to set the defined options statically.
49 return $this->definedOptions;