function EntityConditionTest::testCreateFromQueryParameter

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::testCreateFromQueryParameter()
  2. 8.9.x core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::testCreateFromQueryParameter()
  3. 10 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 40

Class

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

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

public function testCreateFromQueryParameter($case) : void {
    $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());
    }
}

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