Commit 77379d1f authored by borisson_'s avatar borisson_ Committed by borisson_

Issue #2939728 by borisson_, Erik Frèrejean: `WidgetPluginBase` constructor...

Issue #2939728 by borisson_, Erik Frèrejean: `WidgetPluginBase` constructor incompatible with `Drupal\Component\Plugin\PluginBase`
parent a427f100
......@@ -16,7 +16,7 @@ class RangeSliderWidgetTest extends SliderWidgetTest {
*/
public function setUp() {
parent::setUp();
$this->widget = new RangeSliderWidget();
$this->widget = new RangeSliderWidget([], 'range_slider_widget', []);
}
/**
......
......@@ -23,7 +23,7 @@ class SliderWidgetTest extends WidgetTestBase {
*/
public function setUp() {
parent::setUp();
$this->widget = new SliderWidget();
$this->widget = new SliderWidget([], 'slider_widget', []);
}
/**
......
......@@ -36,9 +36,7 @@ abstract class WidgetPluginBase extends PluginBase implements WidgetPluginInterf
* (optional) An optional configuration to be passed to the plugin. If
* empty, the plugin is initialized with its default plugin configuration.
*/
public function __construct(array $configuration = []) {
$plugin_id = $this->getPluginId();
$plugin_definition = $this->getPluginDefinition();
public function __construct(array $configuration = [], $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->setConfiguration($configuration);
}
......
......@@ -18,7 +18,7 @@ class ArrayWidgetTest extends WidgetTestBase {
protected function setUp() {
parent::setUp();
$this->widget = new ArrayWidget(['show_numbers' => 1]);
$this->widget = new ArrayWidget(['show_numbers' => 1], 'array_widget', []);
}
/**
......
......@@ -18,7 +18,7 @@ class CheckboxWidgetTest extends WidgetTestBase {
protected function setUp() {
parent::setUp();
$this->widget = new CheckboxWidget(['show_numbers' => TRUE]);
$this->widget = new CheckboxWidget(['show_numbers' => TRUE], 'checkbox_widget', []);
}
/**
......
......@@ -18,7 +18,7 @@ class DropdownWidgetTest extends WidgetTestBase {
protected function setUp() {
parent::setUp();
$this->widget = new DropdownWidget(['show_numbers' => TRUE]);
$this->widget = new DropdownWidget(['show_numbers' => TRUE], 'dropdown_widget', []);
}
/**
......
......@@ -19,7 +19,7 @@ class LinksWidgetTest extends WidgetTestBase {
protected function setUp() {
parent::setUp();
$this->widget = new LinksWidget();
$this->widget = new LinksWidget([], 'links_widget', []);
}
/**
......
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