'type' => 'painting',
],
$painting))->
save();
} } /**
* @covers ::createFromQueryParameter
* @dataProvider parameterProvider
*/
public function testCreateFromQueryParameter($case,
$expected) { $resource_type =
new ResourceType('foo', 'bar', NULL
);
$actual = Filter::
createFromQueryParameter($case,
$resource_type,
$this->
getFieldResolverMock($resource_type));
$conditions =
$actual->
root()->
members();
for ($i = 0;
$i <
count($case);
$i++
) { $this->
assertEquals($expected[$i]['path'
],
$conditions[$i]->
field());
$this->
assertEquals($expected[$i]['value'
],
$conditions[$i]->
value());
$this->
assertEquals($expected[$i]['operator'
],
$conditions[$i]->
operator());
} } /**
* Data provider for testCreateFromQueryParameter.
*/