yield 'Test null queries' =>
[ ['type' => 'and', 'queries' => null
],
new AndFilter(),
];
yield 'Test without queries' =>
[ ['type' => 'and'
],
new AndFilter(),
];
yield 'Test or filter' =>
[ ['type' => 'or', 'queries' =>
[['type' => 'equals', 'field' => 'name', 'value' => 'foo'
]]],
new OrFilter([new EqualsFilter('product.name', 'foo'
)]),
];
yield 'Test nor filter' =>
[ ['type' => 'nor', 'queries' =>
[['type' => 'equals', 'field' => 'name', 'value' => 'foo'
]]],
new NorFilter([new EqualsFilter('product.name', 'foo'
)]),
];
yield 'Test nand filter' =>
[ ['type' => 'nand', 'queries' =>
[['type' => 'equals', 'field' => 'name', 'value' => 'foo'
]]],
new NandFilter([new EqualsFilter('product.name', 'foo'
)]),
];
}