public function ProductAttributeValueFilterTest::testViewConfig in Commerce Core 8.2
Tests that the created view has a valid configuration.
File
- modules/
product/ tests/ src/ Kernel/ Views/ ProductAttributeValueFilterTest.php, line 49
Class
- ProductAttributeValueFilterTest
- Tests the commerce_product_attribute_value views filter.
Namespace
Drupal\Tests\commerce_product\Kernel\ViewsCode
public function testViewConfig() {
$view = Views::getView('test_product_variations');
$view
->initDisplay();
$view->displayHandlers
->get('default')
->overrideOption('filters', [
'attribute_shirt_target_id' => [
'id' => 'attribute_shirt_target_id',
'table' => 'commerce_product_variation__attribute_shirt',
'field' => 'attribute_shirt_target_id',
'relationship' => 'none',
'group_type' => 'group',
'admin_label' => '',
'operator' => 'in',
'value' => [],
'group' => '1',
'exposed' => FALSE,
'plugin_id' => 'commerce_product_attribute_value',
],
]);
$view
->save();
$this
->assertConfigSchemaByName('views.view.test_product_variations');
}