You are here

public function EntityConditionGroupTest::testConstruct in Drupal 10

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

@covers ::__construct @dataProvider constructProvider

File

core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php, line 20

Class

EntityConditionGroupTest
@coversDefaultClass \Drupal\jsonapi\Query\EntityConditionGroup @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

public function testConstruct($case) {
  $group = new EntityConditionGroup($case['conjunction'], $case['members']);
  $this
    ->assertEquals($case['conjunction'], $group
    ->conjunction());
  foreach ($group
    ->members() as $key => $condition) {
    $this
      ->assertEquals($case['members'][$key]['path'], $condition
      ->field());
    $this
      ->assertEquals($case['members'][$key]['value'], $condition
      ->value());
  }
}