function PluginBaseTest::testUnpackOptions

Same name in other branches
  1. 9 core/modules/views/tests/src/Unit/PluginBaseTest.php \Drupal\Tests\views\Unit\PluginBaseTest::testUnpackOptions()
  2. 8.9.x core/modules/views/tests/src/Unit/PluginBaseTest.php \Drupal\Tests\views\Unit\PluginBaseTest::testUnpackOptions()
  3. 10 core/modules/views/tests/src/Unit/PluginBaseTest.php \Drupal\Tests\views\Unit\PluginBaseTest::testUnpackOptions()

Tests the unpackOptions method.

@dataProvider providerTestUnpackOptions @covers ::unpackOptions

Parameters

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

array $options: The array of options to unpack.

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

array $expected: The expected array after unpacking

bool $all: Whether to unpack all options.

File

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

Class

PluginBaseTest
@coversDefaultClass \Drupal\views\Plugin\views\PluginBase @group views

Namespace

Drupal\Tests\views\Unit

Code

public function testUnpackOptions($storage, $options, $definition, $expected, $all = FALSE) : void {
    $this->testHelperPlugin
        ->unpackOptions($storage, $options, $definition, $all);
    $this->assertEquals($storage, $expected);
}

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