You are here

public function RequestParamConditionTest::testSummary in Condition Query 8

@covers \Drupal\condition_query\Plugin\Condition\RequestParam::summary

@dataProvider provideSummary

Parameters

string[] $config: Array of plugin configuration to use for the test case. Keys can be any supported configuration values that the plugin accepts ('request_param').

string $expected: The expected summary.

File

tests/src/Kernel/RequestParamConditionTest.php, line 149

Class

RequestParamConditionTest
Tests that the Request Param Condition is working properly.

Namespace

Drupal\Tests\condition_query\Kernel

Code

public function testSummary(array $config, string $expected) : void {

  /* @var \Drupal\condition_query\Plugin\Condition\RequestParam $condition */
  $condition = $this->pluginManager
    ->createInstance('request_param');
  foreach ($config as $key => $value) {
    $condition
      ->setConfig($key, $value);
  }
  $this
    ->assertEquals($expected, $condition
    ->summary());
}