function PluginBaseTest::testSetOptionDefault

Tests the setOptionDefault method.

@legacy-covers ::setOptionDefaults

Attributes

#[DataProvider('providerTestSetOptionDefault')]

Parameters

array $storage: The storage array to unpack option into.

array $definition: The definition array, defining default options.

array $expected: The expected array after unpacking.

File

core/modules/views/tests/src/Unit/PluginBaseTest.php, line 71

Class

PluginBaseTest
Tests Drupal\views\Plugin\views\PluginBase.

Namespace

Drupal\Tests\views\Unit

Code

public function testSetOptionDefault($storage, $definition, $expected) : void {
  $this->testHelperPlugin
    ->testSetOptionDefaults($storage, $definition);
  $this->assertEquals($storage, $expected);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.