public function EntityConditionGroupTest::testConstruct in Drupal 9
Same name and namespace in other branches
- 8 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\QueryCode
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());
}
}