You are here

public function PluginBaseTest::testUnpackOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 52
Contains \Drupal\Tests\views\Unit\PluginBaseTest.

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) {
  $this->testHelperPlugin
    ->unpackOptions($storage, $options, $definition, $all);
  $this
    ->assertEquals($storage, $expected);
}