/**
* @covers ::createFromQueryParameter
* @dataProvider queryParameterProvider
*/
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());
} } /**
* Data provider for testDenormalize.
*/
public function queryParameterProvider() { return [ [['path' => 'some_field', 'value' => NULL, 'operator' => '='
]],
[['path' => 'some_field', 'operator' => '=', 'value' => 'some_string'
]],
[['path' => 'some_field', 'operator' => '<>', 'value' => 'some_string'
]],
[