You are here

public function EntityConditionTest::testCreateFromQueryParameter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::testCreateFromQueryParameter()

@covers ::createFromQueryParameter @dataProvider queryParameterProvider

File

core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php, line 38

Class

EntityConditionTest
@coversDefaultClass \Drupal\jsonapi\Query\EntityCondition @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

public function testCreateFromQueryParameter($case) {
  $condition = EntityCondition::createFromQueryParameter($case);
  $this
    ->assertEquals($case['path'], $condition
    ->field());
  $this
    ->assertEquals($case['value'], $condition
    ->value());
  if (isset($case['operator'])) {
    $this
      ->assertEquals($case['operator'], $condition
      ->operator());
  }
}